【自动化__持续集成】___java___代码封装
一、代码如下
package com.wujianbo; public class TestPrivate { int age; int height; int weight; String name; String nation; double salary; public static void main(String[] args) { // TODO Auto-generated method stub TestPrivate testprivate= new TestPrivate(); testprivate.eat(); testprivate.sleep(); } private void eat() { // TODO Auto-generated method stub System.out.println("正在吃饭"); } private void sleep() { // TODO Auto-generated method stub this.eat(); System.out.println("正在睡觉"); } }