java程序在使用JOptionPane输入和输出时在二维数组中输入类号时查找楼层号

时间:2014-02-28 22:46:39

标签: java arrays joptionpane

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]);

  }
    }
   }

让我知道

0 个答案:

没有答案