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 |
When you say String is immutable, what do you mean by that? Say I have String s = "Ness" s= s+"Technologies"; What will happen? If the value gets appended, then what is the meaning of immutable here?
What is java reflection api?
We can write any Java Logics in our JSP. Then why we are using servlets(Controller Layer) to interact with the DAO ?
What happens when you assigned a 'double' value to a 'String'?
How do you clear a list in java?
What is void keyword?
Under what circumstances an object reference be cast to an interface reference?
what methods would you overwrite in java.lang.object class?
what is request processor?
Which package is imported by default?
Does java allow overriding static methods ?
difference between byte stream class and character stream class?