Why main method in java is public

Why main method in java is public :-

       -> In case of java the main method is implicitly called by JVM.

    -> As the main method is public then the JVM is able to call it but if the main method is not public then the program compile successfully but the program terminate at the runtime as the main method is called by JVM.

Why main method in java is public
 

public class u

{

 static void main(String args[])

{

int data=150;

System.out.println(data);

}

}

In this case the program is compile successful but it gives runtime error because we know that as the main method is public then the JVM is able to call the program.

Why main method in java is public

for more detail follow my Instagram id - https://www.instagram.com/asitmaharana10/

Thank you.