Ask a Question

In C, it is possible to call main() function from another function. but in Java, is it possible to call main() method from any other method?


Rajni

on 2010-10-21 09:30:00  

yeh there is no way to call main function of one class 2 another , u prepare that code in the main in one method as some class c1 { public void call() { } } inside this method u write the code.. in another class u call the object of that class & call that method like class c2 { public static void main(..) { C1 o=new C1; o.call; } }