why we use main in class java code example Example: main class java public static void main(String[] args) {}