java program to findout floor number when inputing class number in 2 dimensional array using JOptionPane for input and output
这就是我写的..有谁可以帮助我? 告诉我,我是否朝着正确的方向前进?
import javax.swing.JOptionPane;
import java.util.Scanner;
public class Floor {
public static void main(String[] args)
{
int classno [] = new classno[12];
int floorno [] = new floorno [4];
String[][]Foors= new string[][12];
floors[0]=new string[1 2 3]
floors[1]=new string[4 5 6]
floors[2]=new string[7 8 9]
floors[3]=new string[10 11 12]
String classInput = JOptionPane.showInputDialog("Please input a class no: ");
for (int i = 0, classno[0].length)
if(("classno[0][i]").equals("floorno"))
{
String classOutput = JOptionPane.showOutputDialog ("classno:" + floorno[1][i]);
}
}
}
让我知道