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 |
whats the diff between jsp and servlets?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
Write a program in java to find the maximum and minimum value node from a circular linked list.
What does int argc char * argv [] mean?
can we write a program with out a class in core java?
Is java owned by oracle?
What is nextline method in java?
What is the difference between Array and Hash Table?
Difference between String and StringBuffer.
write a progam hashmap & hashtable?
What is a null check?
What is the difference between class & object?