1.public class 类名{对象
属性class
方法变量
}引用
2.对象方法
a.建立对象im
类名 对象名=new 类名();static
Telephone phone =new Telephone();new
b.使用对象
引用对象的属性:对象名.属性
phone.sceen=5;//赋值
引用对象的方法:对象名.方法名()
phone.sendMessage;//调用xx方法
3.静态变量
static String hobby ="imooc";
System.out.println(HelloWorld.hobby );//静态变量能够直接用类名访问,无需建立类的对象