variable.methodName(argumentList) public class MainClass { public static void main(String[] argv) { MyClass cls = new MyClass(); cls.aMethod(); } } class MyClass { public void aMethod() { System.out.println("aaa"); } }