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


Please Help Members By Posting Answers For Below Questions

Break statement can be used as labels in java?

556


Define jit compiler?

665


What is indexof in java?

519


What is tostring () method?

546


What is arraylist e in java?

518






What is command line argument in java?

609


Is multiple inheritance supported by java?

511


What is the difference between C++ and Java and your preferences?

616


What is the multi-catch block in java?

538


Is java util list serializable?

541


What type of variable is error flag?

591


Are there structures in java?

559


What is use of static method?

537


Is main a function?

517


Explain the concept of proper inheritance?

623