[java] Can a main() method of class be invoked from another class in java