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 are Brief Access Specifiers and Types of Access Specifiers?
What is the ==?
What is the difference between yielding and sleeping?
When do you call copy constructor?
0 Answers Tavant Technologies, Virtusa,
What is tochararray in java?
What is the purpose of an interface?
how we can make a write-only class in java?
What does replaceall do in java?
Can inner class extend any class?
if am have 100 threads(for ex:T1,T2---T100) how we give priority to these threads and how the system excute these threads
can we overload main method?
What do you mean by light weight and heavy weight components?