I was searching answer for finalize method made protected in object class, I came accross the answer and finally got confused as i found For finalize() method of object class it has been said that : It's not public (or default access) because it's meant to be called by the JVM internally when the object is garbage collected - it's not meant to be called by anything else.
public static void main(String arr[]), this also meant to be called by JVM only, because JVM is outside my class outside my project, so to access this method by JVM, it should be public.
This make sense for JVM and main(), but finalize() method for the same reason as it is called by JVM, it can't be public.
Could someone please make this picture clear for me. Thanks in advance