when i execute subtest class using java2 , the following code is
running successfully and giving the output message " main executed" .
how can a private method of superclass is being accessed in sub class?
can anybody clarify me?

public class subtest extends test {

class test {

private static void main(String args[]) {

System.out.println("main executed" );