public class Person {
String name;
int age;
String school;
String major;
public Person(String n,int a) {
name=n;
age=a;
}
public Person(String n,int a,String s) {
name=n;
age=a;
school=s;
}
public Person(String n,int a,String s,String m) {
name=n;
age=a;
school=s;
major=m;
}}
class TestPerson{
public static void main(String[]args) {
Person one=new Person("花花",15,"中学","体育");
System.out.println(one.name,one.age,one.school,one.major);
}
}
它提示我这个错误 怎么解决 感谢
The method println(int) in the type PrintStream is not applicable for the arguments (String, int, String, String)
qq_清影无痕_0
慕莱坞8333017
qq_木偶_2
相关分类