The only time it matters is if you are using OuterClass.this.method()
e.g.
class OuterClass {
void method() { }
class InnerClass {
void method() {
OuterClass.this.method(); // not the same as method().
}
}
}
More Related Contents:
- Can't call method from class 1 in class 2 [closed]
- How to create a loop thats includes a if statement
- Java Questions! About List and Objects
- The syntax of the method [closed]
- nothing happens when i execute the code. Got my methods right? [closed]
- Is it possible to change the return value of a method in this case? [closed]
- Java Array Parameter and Array Type Metot [closed]
- String index out of range in jva
- Variable may not of been initialized even though it has been in the method
- Which overload will get selected for null in Java?
- Java synchronized static methods: lock on object or class
- Why does this Java method appear to have two return types?
- Why doesn’t Mockito mock static methods?
- Converting Integers to Roman Numerals – Java
- Should private helper methods be static if they can be static
- Set and Get Methods in java?
- Count words in a string method?
- How do I intercept a method invocation with standard java features (no AspectJ etc)?
- Can I get all methods of a class?
- How to use a variable of one method in another method?
- Compiler error : reference to call ambiguous
- If statement using == gives unexpected result [duplicate]
- Making java method arguments as final
- Varargs Java Ambiguous Call
- Java: Sending Multiple Parameters to Method [closed]
- Java Inheritance – calling superclass method
- Final arguments in interface methods – what’s the point?
- Can there exist two main methods in a Java program?
- Abstract methods in Java
- If a synchronized method calls another non-synchronized method, is there a lock on the non-synchronized method