- 博客(1)
- 收藏
- 关注
原创 Constructor call must be the first statement in a constructor
问题描述:class Emplyee{ private String name; private int age; private double salary; public Employee(String newName,int newAge,double newSalary) { this(newAge,newSalary); System.out.println("三个参数的构造方法被调用"); name=newName; }}原因分析:Constructor call
2020-12-20 12:43:19
278
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人