Run ❯
Get your
own Java
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
// Functional interface (one abstract method) interface Greeting { void sayHello(); } public class Main { public static void main(String[] args) { Greeting g = new Greeting() { public void sayHello() { System.out.println("Hello from anonymous class"); } }; g.sayHello(); } }
Hello from anonymous class