how can display array in reverse?
package hello1;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;
public class Untitled1 {
public static void main(String args[]) {
int ali[]=new int[6];
int a;
String value;
for(a=0; a<6;a++){
value=JOptionPane.showInputDialog("Please enter a number ");
ali[a]=Integer.parseInt(value);
}
StringBuffer message = new StringBuffer("The arrayw was :");
for ( a=6; a>0; a) {
message.append("\n ");
message.append(ali[a]);
}
JOptionPane.showMessageDialog(null, message.toString());
System.exit(0);
}
}