write java code to print second max number in the array
Answers were Sorted based on User's Feedback
Answer / rajesh s
If we give negative values, what would be the Rajaraman
code begaves????
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / murali
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class SecondMax {
public static void main(String[] args) {
String [] str={"3","4","2","1"};
List<String> ls=Arrays.asList(str);
Collections.sort(ls);
System.out.println(ls.size()-1);
}
}
| Is This Answer Correct ? | 0 Yes | 2 No |
What is aggregation?
What do you know about the garbage collector in java?
How do you relate a Interface to a Class? Tell me in Detail?
What is the range of the short type?
tell me some common
What is integer parseint?
Write a program to find the greatest of three numbers in java?
what is servlet enginee?
How thread scheduler schedule the task?
What is java util concurrentmodificationexception?
Explain the overview of UDP messaging.
What is difference between module and function?