write java code to print second max number in the array
Answer Posted / sunny
I think, the except for Himesh's program, all other ones
doesnt handle duplicate values ...
I mean if the numbers are :- 9 9 8 8 7 7 7 1 3 2
the answer should be 8 ideally.
But I doubt whether thats really happening in any other
programs, except for Himesh's.
Do let me know, if I am wrong. Thanks.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How do you sort in java?
What are the differences between string, stringbuffer and stringbuilder?
What is finalize()? Is finalize() similar to a destructor?
How do you reverse a word in java?
What is mnemonic code?
What do you understand by final value?
What two classes are used to read data only?
What is the gregoriancalendar class in java programming?
What is string english?
What does a method signature consist of?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
What are keywords in programming?
Is arraylist dynamic in java?
How is it possible for two string objects with identical values not to be equal under the == operator?
Why do we need hashmap in java?