I was curious about how the JVM works. Does the JVM acknowledge method accesibility rules like \'private\' protected or is that only done at compile time?
For examp
If you want to call this method from outside current class you could call private & protected methods using reflection.
Method m = RunX.class.getDeclaredMethod("test3");
m.setAccesible(true);
m.invoke(u);
however you can call this protected (and also private) method directly from main()
without any issues.