Experienced programmer will help you in it..
But i think you should first understand what is the need of the program and then go for it by properly taking into consideration the behavior of all the classes.
See Dreams With Open Eyes And Make It Real
Joined: Aug 27, 2009
Mohd Abrar Khan wrote:
sorry for asking but could any one help me out how to write a main method,
things are easy when i am writing the whole class code,
but if someone gives me a class and i have to write the main method for it,
how should i start and what things are to be primarily considered.
The contents of a main method depend *completely* on what you need it to do--there's no way to provide any generic advice.
Mohd Abrar Khan
Joined: Jan 20, 2010
Thanks for your replies Guys,
I have apologized for asking this question at the beginning of this topic as i knew about the stupidity of this question,
ya i am a beginner,
the reason for me asking this question was that i came across a big class programme which had 6-7 methods and 3 subclasses and each doing a specific task and there was no main method for this class,
i tried writing the main method, but could'nt compile it properly so thought i might be missing something in calling all the functionalities of that class in my main method, so asked you guys for your suggestion,
Mohd Abrar Khan wrote:I have apologized for asking this question at the beginning of this topic as i knew about the stupidity of this question,
Your question isn't stupid, so you don't need to apologize.
ne ways was expecting some serious answers!!!
As David said, what you do in the main method completely depends upon what you want to do. Generally the first step would be to create instances of the required class and calling any methods on them...