public class test1
{
static int count;
public static void main(String args[])
{
System.out.println("Inside test1 class");
if(count<=1)
{
count++;
test2 obj = new test2();
}
}
}
class test2
{
public test2()
{
String args[] = new String[] {"ABC"};
System.out.println(" Inside test2 class\n Now, invoking main method of test1 class");
test1.main(args);
}
}
Comments
Post a Comment