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 |
Explain about GridBag Layout?
What do you mean by inner class in java? Explain
Explain polymorphism citing an example.
Why deletion in linkedlist is fast than arraylist?
Why constructor has no return type?
hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class
describe synchronization in respect to multithreading? : Java thread
Difference between Preemptive scheduling vs. Time slicing?
What is procedure writing?
Is binary a low level language?
What is the difference between method and constructor ?
Does garbage collection guarantee that a program will not run out of memory?