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 |
What is stringbuffer in java?
what is the use of StringBuffer?
Can we have any other return type than void for main method?
Which class should you use to obtain design information about an object
Write code to implement bubble sort in java?
what is difference betwwen hashmap and hashtable ?
What is boolean logic?
What initialize variables?
What do you know about the garbage collector?
What are non-access modifiers?
What is executor memory?
Does string isempty check for null?