企业🤖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 创建的对象,就会开辟一个新的储存空间