|
Call the class main function
I define a class and write the main method without static. I can compile it. But in other class when I initiate one instance of that class (call it aa) and call aa.main(args); (with args the correct input type), I got an error "variable aa might not have been initialized.
I understand that main is called when it is executed. Then does that mean public static is the only way all the main functions can be, at least meaningfully?
|