public class MyClass { void myMethod() { System.out.println("You have called me! My name is: myMethod!"); } public static void main(String[] args) { new MyClass().myMethod(); } }