java对象
使用java中的对象(实例化类)
新建InitailTelphone.java
/javaDemo1/src/com/imooc/InitailTelphone.java
package com.imooc;
public class InitailTelphone {
public static void main(String[] args) {
// TODO Auto-generated method stub
Telphone phone = new Telphone();
phone.sendMessage();
phone.cpu = 5.0f;
phone.screen = 3.0f;
phone.sendMessage();
}
}
右键-> run as
-> Java Application