Two Laptop Bag
The moose likes Beginning Java and the fly likes Please Explain Why Output is so? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Please Explain Why Output is so?" Watch "Please Explain Why Output is so?" New topic
Author

Please Explain Why Output is so?

vishal mishra
Ranch Hand

Joined: Jul 12, 2010
Posts: 77
Namaste !! to all Friends

I have found a question in a document which i have downloaded from the site www.examcertify.com

Question is-:

Output given-:[2, 5, 3, 1]

I have compiled the program and executed it.It is giving the same output.
According to me output should be [5,3,2,1].
Please Explain me Why output is not what i thought...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35223
    
    7
Let's turn around and ask you: why do you think the output should be [5,3,2,1]?


Android appsImageJ pluginsJava web charts
vishal mishra
Ranch Hand

Joined: Jul 12, 2010
Posts: 77
Thanks !! I got it !!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Please Explain Why Output is so?
 
Similar Threads
Teaching without primitives
can we add primitive variables in ArrayList or just objects?
Generics
Binary insertionSort with ArrayList
dragdrop-colections