What is the point of the this keyword in Java if variables are by default instance variables?

前端 未结 0 935
太阳男子
太阳男子 2020-12-19 04:12

In Java, are the following two classes equivalent?

class Employee1 {
    public String name;

    public Employee1 (String empName) {
        name = empName;
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题