基础方法 作用: 方法减少重复代码,能重复调用,分工合作 格式: 修饰符 返回值 方法名 (参数) {方法体} 例子: public void printt(){System.out.print("吃饭了吗"}