AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## 如何创建对象 >[success]类 引用 = new 类 ( ); ====> 类 引用 = 对象; ``` public static void main(String[] args) { //创建学生对象 Student student=new Student(); //通过引用操作对象的属性和行为 student.name="张三"; student.age=22; student.gender="male"; student.stuNo="20155121"; student.study(); student.playGame(); } ``` * 只要有new 创建的对象,就会开辟一个新的储存空间