实在不明白,请帮忙解答一下

来源:百度知道 编辑:UC知道 时间:2024/06/10 15:49:59
import java.io.*;
import java.util.*;
class Student {
String name;
float score;

String getname(){
return this.name;
}
float getscore(){
return this.score;
}
}
class Input{
String f()
throws IOException{
String a="";
BufferedReader distream=new BufferedReader(new InputStreamReader(System.in));
a=distream.readLine();
return a;
}
float f1()
throws IOException{

BufferedReader distream=new BufferedReader(new InputStreamReader(System.in));
return (float)distream.read();
}
}
class Jianqiao{
static int i=0;
public static void main(String args[]){

Student[] S=new Student[10];
for(i = 0 ; i < 10; i++){
S[i] = new Student();
}

for(i=0;i<10;i++){
System.out.println("请输入名字,成绩:");
Input a=new Input();

这是java程序啊
for(i = 0 ; i < 10; i++){
S[i] = new Student();
} 这个for循环是为结构体对象申请空间,这样这个对象才可用
输入输出不一样你要具体看看他的输入输出函数怎么写的。