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 heterogeneous in java?
What is class level lock ?
what are class,constructor and primitive data types?
What is a ternary operator in java?
What are data types in programming?
why Java does not support multiple inheritances?
What modifiers may be used with a top-level class?
What are the benefits of operations in java?
What happens when heap memory is full?
Is java owned by oracle?
List the features of java programming language.
What is regex java?