排序简单的数组列表

时间:2016-04-13 16:10:36

标签: java arrays sorting

我是java的初学者,我将如何根据用户输入按字母和数字顺序对以下内容进行排序。然后通过JOptionPane显示排序结果? (顺便说一句,这是一个正常运作的数组?)

for (int i=0;i<loop2.length;i++) {

    String [] staff = new String[7];

    staff [1] = JOptionPane.showInputDialog(null,"Enter staff name: "+i);      
    staff [2] = JOptionPane.showInputDialog(null,"Enter staff address: "+i);
    staff [3] = JOptionPane.showInputDialog(null,"Enter staff email: "+i);
    staff [4] = JOptionPane.showInputDialog(null,"Enter staff salary: ");

    JOptionPane.showMessageDialog(null, staff);
}

0 个答案:

没有答案