Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in..

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 all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in..

Answer / anandkumar

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

Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in..

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

Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in..

Answer / guest

5
4
3
2
1

Is This Answer Correct ?    0 Yes 9 No

Post New Answer

More Core Java Interview Questions

what is the difference between Cpp And Java

15 Answers   Infosys,


Keywords in Exceptions?

2 Answers  


Are constructors methods?

0 Answers  


what is main difference b/w abstract class and interface

4 Answers  


Which one will take more memory: an int or integer?

0 Answers  


Can you override a private or static method in java?

1 Answers  


How do you stop a thread in java?

0 Answers  


As a developer what steps do you take to improve the performance?

4 Answers  


How does compareto work in java?

0 Answers  


What are java annotations?

0 Answers  


Explain about vector, dictionary,hash table, property classes?

1 Answers   Patni,


how can i use a nonsynchronized hashtable?

0 Answers   CoreObjects,


Categories