Home / Programming MCQs / JAVA MCQs / Question
T
Q. What will be the output of given code
import java. util.Arrays; import java. util.Comparator; class Sorting implements Comparator { public int compare(Integer o1, Integer o2) { return o2. compareTo(o1); } } public class abc { public static void main (String…a) { Integer intArray[]= {2,3,1}; Arrays.sort(intArray, new Sorting()); for(int i: intArray) { System. out. print(i+””); } } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
The CharArrayWriter class is not used to write data to multiple files
Complexity of ArrayList get method
What is the default value of an element of Object type array?
Mutual exclusive and inter-thread communication are which type of Synchorization?
What is the output of the following code?
Which keyword is used by classes to implement an interface?
Discusssion
Login to discuss.