answersLogoWhite

0


Best Answer

By "Java built in sort method", I assume you are referring to Arrays.sort() in the java.util package. Arrays.sort() is overloaded to handle all primitive and Object types except boolean.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What primitive type of array can be sorted using the Java build-in sort method?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the best sorting technique for already sorted array?

If it is already sorted, the best is to leave the array as it is.If it is already sorted, the best is to leave the array as it is.If it is already sorted, the best is to leave the array as it is.If it is already sorted, the best is to leave the array as it is.


What is the different sorting algorithms for arrays in java?

The built in array sorting algorithm (java.util.Arrays.sort) depends on the type of data being sorted. Primitive types are sorted with a modified implementation of quicksort. Objects are sorted with a modified implementation of mergesort.


Is an array that is in sorted order a min heap?

Yes, an array that is in sorted order is considered a min-heap because the smallest item in the array is the root. Also, the rest of the items in the array will gradually get bigger from the root until the end of the array.


Can you store non primitive data type in the array list?

Yes you can store non primitive data type variables in an array. String is a non primitive data type. You can declare a string array as: String a[]=new String[10];


Sort array in ascending descending order in python?

Using sorted(array,reverse=True)


What is a example of a array?

An ordered array is simply an array where all elements are in sorted order: int a[] = {3, 6, 9, 10, 15, 21}; // ordered array An array can either be initialised with ordered elements or the elements may be sorted after initialisation. When inserting new elements into an ordered array, the order must be maintained.


Why arrays are not primitive data type?

An array is a primitive data type. It is the element type that may or may not be primitive.


Non primitive data type?

Struct or array.


When an array contains values other than primitive data types is it considered a control array?

Only if the non-primitive data types are actually controls, such as an array of label controls, or an array of edit boxes. However, a control array is still an array. The only difference is that the values will likely be resource handles (objects that refer or point to the actual object which will be stored elsewhere in memory) rather than an actual value itself. That is, an array of primitive data types stores the actual value in the array itself.


Should element in an array must be of primitive data type?

No, it can be array, structure or union as well.


Is array a primitive data structure?

No, it's not. But it can be based on primitive data types (int, char, long, double and so on).


Is string arr a non primitive data type?

Depends on the context of the question you were asking from, there are 2 distinct answers: Yes and NO. In the narrowest definition, any array is NOT a primitive data type in C#. Hence a string array is NOT a primitive data type in that context. A string itself, however, is a primitive data type. Some developers would like to extend the definition of "primitives" into the arrays, collections, and Enumeration. Thus, in this context, an array of string IS a primitive data type.