Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 14 Online
OpenStudy (anonymous):

how to run a java class with static data members in other java class having main method?

OpenStudy (anonymous):

This question is quite vague. Kindly elaborate it. You can create objects of one class in another class i.e. by creating objects you can call the constructor of other class which can contain all the codes u want to run at in another class. Thus by calling other class, 1st class will be called as well. Example class 1st{ Constructor{ //your code } } 2nd class{ Constructor{ } main{ create obj of 1st class create obj of 2nd class } } Ignore it syntactically!! Hope this'll satisfy you

OpenStudy (anonymous):

*Hope so*

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!