类 = 字段+方法class person{ //name和age属于类中的字段 String name; int age; //sayhello()函数属于类的方法 void sayhello(){ System.out.println("嗨嘿嗨"); }}