/** * @author lautturi.com * Java example: Example of java this keyword to invoke class method */ import java.util.*; class A { void m() { System.out.println("hello m"); } void n() { System.out.println("hello n"); //m();//same as this.m() this.m(); // By default added by the compiler } } public class Lautturi { public static void main(String[] args) { A a = new A(); a.n(); } }