1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import java.util.ArrayList; import java.lang.*; public class reverse { public static void main (String []args) { ArrayList a= new ArrayList(); a.add("entry 0"); a.add("entry 1"); a.add("entry 2"); a.add("entry 3"); a.add("entry 4"); System.out.println(a); System.out.println(reverse(a)); } public static ArrayList reverse( ArrayList list ) { ArrayList store= new ArrayList(); for (int i = 0; i < list.size(); i++) { store.add(list.get(list.size() -1 - i)); } return store; } } |
12
Jan
Java Reverse – Method
2 Responses to “Java Reverse – Method”
Place your comment
Please fill your data and comment below.
© Why So Scared 2009 | Created by Get a Custom Design.
Powered by WordPress
Buy:Arimidex.Mega Hoodia.Retin-A.Synthroid.Actos.Prevacid.Petcam (Metacam) Oral Suspension.Lumigan.Nexium.100% Pure Okinawan Coral Calcium.Human Growth Hormone.Zovirax.Accutane.Zyban.Valtrex.Prednisolone….
Buy:Female Cialis.Lipitor.Female Pink Viagra.Seroquel.Zetia.Acomplia.Wellbutrin SR.Lasix.Lipothin.Benicar.Amoxicillin.Cozaar.Zocor.Nymphomax.SleepWell.Advair.Prozac.Buspar.Ventolin.Aricept….