Java拷贝构造函数 构造函数在Java中重载 Java静态方法 Java拷贝构造函数 public class Tester { private String message; public Tester(String message){ this.message = message; } public Tester(Tester tester){ this.message = tester.message; } public String getMessage(){ return message ; } public void setMessage(String message){ this.message = message; } public static void main(String[] args) { Tester tester = new Tester("Welcome"); System.out.println(tester.getMessage()); Tester tester1 = new Tester(tester); System.out.println(tester1.getMessage()); } } 构造函数在Java中重载 Java静态方法