Sunday, November 15, 2009

reverse

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package corejava;
public class Main {
public static void main(String[] args) {
int a[]=new int[3];
a[0]=1;
a[1]=2;
a[2]=3;
int j=a.length-1;
for(;j>-1;j--)
{
System.out.println("j"+a[j]);
}
}
}

No comments:

Post a Comment