Hai all
I want to print given array in reverse order Ex:
int a[]={1,2,3,4,5};display this array in reverse order.
Answers were Sorted based on User's Feedback
Answer / nagesh
for(int i=a.length-1;i>=0;i--){
System.out.println(a[i])
}
Is This Answer Correct ? | 9 Yes | 1 No |
hai kumar you r wrong
with use of loop only we can reverse...
we can't do it with reverse() method b'coz this is not String Type....
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / kumar
Either you can use the for loop or reverse() method to
display the results in reverse order.
Is This Answer Correct ? | 1 Yes | 2 No |
How large is a boolean?
i need to know the site which compiles and run the java program completely in online... thank you for your reply in advance
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com
How many bytes is a url?
hi to all. well can you please tell me that why String class is immutable? Thanks in advance.
How a class can implement an interface?
What is output buffer?
What is the full meaning of java?
What are virtual methods?
Is logger a singleton?
How do you add an element to an arraylist in java?
Can we access a database using applets?