面向对象课程

2023-09-14T10:50:00

class Person{
int age;
String name;
public  void sayHello(String name,int age){
    System.out.print("年龄"+age+"姓名"+name);

}


}
public class App {
    public static void main(String[] args) throws Exception         {
    Person person=new Person();
    person.age=19;
    person.name="天空";
    person.sayHello(person.name,person.age);
    }

}

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »