public class CountTest
{
/**
* @param args
*/
public static void main(String[] args)
{
Object[][] o = {{"1001","1002","1003"},{80,88,75},{99,93,85},{92,87,93}};
String str = "1001";
for (int i = 0; i < o[0].length; i++)
{
if(str.equals(o[0][i]))
{
System.out.println(str +"的成绩:");
for (int j = 1; j < o.length; j++)
{
System.out.print(o[j][i] + " ");
}
System.out.println();
}
}
}
}
追问我是要自己输入成绩和学号 不是已经定义完了的阿
本回答被网友采纳