How do you sort data in java?



How do you sort data in java?..

Answer / Prem Prakash

"Sorting data in Java can be achieved using various methods such as Arrays.sort(), Collections.sort(), or implementing the Comparable and Comparator interfaces. The default sorting order is ascending, but it can be changed to descending if needed."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why is String immutable?

1 Answers   Atos Origin,


Does java initialize arrays to zero?

1 Answers  


What are the limitations of procedural programming approach?

1 Answers   Amdocs,


why should we get the following error ? Exception in main method NoClassDefFoundError:classname could anyone give the detail clarification on how java compiler can look for .class file?

2 Answers  


Explain about the main() method in java?

1 Answers  


Any one can explain how the inerface uses in java. give with example.

1 Answers   IBM,


What is pre increment and post increment in java?

1 Answers  


why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why these methods are placed in Object class?

2 Answers   Global Logic, Satyam,


Which category the java thread do fall in?

1 Answers  


Why java applets are more useful for intranets as compared to internet?

1 Answers  


What are the different types of data structures in java?

1 Answers  


What is the purpose of java?

1 Answers  


Categories