The enclosing object instance of an inner class can be accessed in Java as described in the following example:

public class EnclosingClass {

    private int number = 12;

    public void callInnerMethod() {

       InnerClass inner = new InnerClass();
       inner.printNumber();
    }

    class InnerClass {
        
        public void printNumber() {
      
            System.out.println(EnclosingClass.this.number);
        }
    }

    public static void main(String[] args) {
      
        EnclosingClass enclosingObject = new EnclosingClass();
        enclosingObject.callInnerMethod();
    }
}

When this code is run, 12 will be printed to the screen.