共计 327 个字符,预计需要花费 1 分钟才能阅读完成。
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
正文完
发表至: java
2019-01-21