1. public static void main(String[] args) {
    2. //根据Phone类,创建一个名为one的对象
    3. //格式:类名称 对象名 = new 类名称();
    4. phone one = new phone();
    5. System.out.println(one.brand); //null
    6. System.out.println(one.price); //0.0
    7. System.out.println(one.color); //null
    8. System.out.println("===========");
    9. one.brand = "华为";
    10. one.price = 8388.0;
    11. one.color = "白色";
    12. System.out.println(one.brand); //华为
    13. System.out.println(one.price); //8388.0
    14. System.out.println(one.color); //白色
    15. System.out.println("===========");
    16. one.call("AAAA"); //给AAAA打电话
    17. one.sendMessage(); //群发短信
    18. }