how to create an instance of a class in its own main method java code example Example: main class java public static void main(String[] args) {}