i've made something like this.. it compiles but does not run...
public static void main (String args[]) {
String [] num=new String [5];
int n=num.length;
int i;
int j;
for (i=0; i<num.length; i++){
String enter=JOptionPane.showInputDialog ("Enter a character:");
}
int out, in;
for (out=1; out<n; out++){
String temp=num[out];
in=out;
while (in>0&&num[in-1].compareTo(temp)>=0){
num[in]=num[in-1];
--in;
}
num[in]=temp;
}
Please, can anyone help me???
Thanks a lot!!!


Sign In
Create Account


Back to top









