Hello I am taking a high school class and I need help. I am getting the error mentioned in the title. here is my code (i am supposed to make random numbers for people to guess where a zero is and i need to let them know if theyre close to it and how close theyre)
import javax.swing.JOptionPane;
public class p5g
{
public static void main(String[] arg)
{
String width = JOptionPane.showInputDialog("How many rows do you want?");
String length = JOptionPane.showInputDialog("How many columns do you want?");
int lol = Integer.parseInt( width );
int wow = Integer.parseInt( length );
int[][]gameBoard = new int[lol][wow];
int[] nums = new int[lol*wow];
for(int i =0; i < nums.length; i++)
{
nums[i]=(int)100*Math.random();
}
String row = JOptionPane.showInputDialog("Choose a row");
String col = JOptionPane.showInputDialog("Choose a column");
int ro = Integer.parseInt( row );
int co = Integer.parseInt( col );
}
}