import javax.swing.JOptionPane ;
import java.util.Random;
public class Program5 {
public static void main(String[] args) {
Random rndNumbers = new Random();
string [] ; person = new int[10];
string [] table = new int[2][5];
person[1] = JOptionPane.showInputDialog(null,"Enter FullName");
person[2] = JOptionPane.showInputDialog(null,"Enter FullName");
person[3] = JOptionPane.showInputDialog(null,"Enter FullName");
person[4] = JOptionPane.showInputDialog(null,"Enter FullName");
person[5] = JOptionPane.showInputDialog(null,"Enter FullName");
person[6] = JOptionPane.showInputDialog(null,"Enter FullName");
person[7] = JOptionPane.showInputDialog(null,"Enter FullName");
person[8] = JOptionPane.showInputDialog(null,"Enter FullName");
person[9] = JOptionPane.showInputDialog(null,"Enter FullName");
person[10] = JOptionPane.showInputDialog(null,"Enter FullName");
int i;
for(i = 0; i < 5; i++){
table(1,person(i));
}
for(i = 6; i < 10; i++){
table(2,person(i));
}
System.out.println("table1 = " + persons) ;
System.out.println("table2 = " + persons) ;
}
}
I'm am trying to place 10 people around two tables of 5 at each table randomly which i need help to get this program running. it does not allow me to javac the program because there is an error in the code which i don't know.can someone help me to get this program to run? i am new to java and still don't understand all aspect at this point. i don't know what the errors is or what to do.

New Topic/Question
Reply



MultiQuote





|