Hi,
Let's say I have a ClassA class and a methodA private method in Java.
In my ClassB class I have a main method where I invoke MethodA. This should not work, obviously.
What can I do to throw an Exception or Error when this happens during the runtime.
Thanks.