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 |
Give the difference between the println method and sqrt method?
How to sort an array from smallest to largest java?
what is the use of thread?Justify it by project point of view
What is callable java?
What is an iterator java?
Can inner class extend any class?
Why is logger singleton?
What is package private scope in java?
What are Normalization Rules? Define Normalization?
What do you meant by active and passive objects?
What is the set interface in java programming?
Can a set contain duplicates?