摘要: public static void main(String[] args) { Person person = new Person("zhangsan",23); System.out.println(person.name); System.out.println(person.age);} 阅读全文
posted @ 2024-01-15 17:28 fightownself 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 类和对象的创建 public static void main(String[] args) { //类:抽象化,实例化 //类实例化会返回一个自己的对象 //student对象就是一个Student类的具体实例 Student xiaoming = new Student(); Student x 阅读全文
posted @ 2024-01-15 16:37 fightownself 阅读(1) 评论(0) 推荐(0) 编辑