why this keyword is used in java interface and what does it refer?
问题 I just figured that I can use the this keyword in an interface . So, if this keyword represents current class object reference in a class , then what does it represent in an interface ? interface InterfaceOne { default void display() { this.defaultMethod(); System.out.println("InterfaceOne method displayed"); } default void defaultMethod() { System.out.println("defaultMethod of InterfaceOne called"); } } 回答1: Even in this case, the this keyword is used in the same context and meaning. One