Folders and files Name Name Last commit message
Last commit date
parent directory
View all files
1. Classes, static classes, inner classes
*.java
file must have exactly one public class , its name must be equal to filename
to creation new instance of inner class must exist instance of outer class
has access to attributes and methods of outer class
it can exist inner class inside method - its instance is available only inside the method
declaration and instance creation is at the one place (in single command) - class definition
is at the another place as abstract class or interface
has no access to attributes and methods of abstract class
can be used as method input argument - abstract method must be implemented at the usage place
since Java 8 is possible to use lambda expressions or method reference (see next chapters of OCA and OCP parts)
is accessible without instance of outer class
has no access to attributes and methods of outer class
You can’t perform that action at this time.