面向对象课程
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);
}
}
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »