In general you use OuterClassName.this
to refer to the enclosing instance of the outer class.
In your example that would be a.this.otherMethod()
More Related Contents:
- How are Anonymous inner classes used in Java?
- Is an enum constant-specific class body static or non-static?
- How to convert a letter to an another letter in Java [duplicate]
- Real differences between “java -server” and “java -client”?
- Conditionally ignoring tests in JUnit 4
- Spring @Transactional – isolation, propagation
- ISO 8601 String to Date/Time object in Android
- How do I convert a String to an InputStream in Java?
- How to handle very large numbers in Java without using java.math.BigInteger
- Jackson serialization: ignore empty values (or null)
- Is there an equivalent of java.util.regex for “glob” type patterns?
- How do you assert that a certain exception is thrown in JUnit tests?
- Regex to find whole words
- exclude @Component from @ComponentScan
- Automatic cookie handling with OkHttp 3
- SSL peer shut down incorrectly in Java
- Including jar files in class path
- Why does appending “” to a String save memory?
- Will Java Final variables have default values?
- Stream video in Java
- Too much data for RSA block fail. What is PKCS#7?
- Check is a point (x,y) is between two points drawn on a straight line
- Is it possible to write swap method in Java? [duplicate]
- org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection Selenium ChromeDriver and Chrome v111
- Spring Boot shutdown hook
- HTTP request compression
- Can the Eclipse Java formatter be used stand-alone
- Java Keytool error after importing certificate , “keytool error: java.io.FileNotFoundException & Access Denied”
- How to interrupt underlying execution of CompletableFuture
- Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core”