Need to use public,static keywords in main function?
Answer Posted / psreddy
public access modifier we declared then that class visible
to every where and access to any where
bcoz if we write any number business logic classes but
we have to write only one execution logic class for all
these business logic classes
that is why always execution logic class as public
and also there is need of writing static key word
bcoz the execution logic executes only once
other wise we will get runtime exeption
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Can I extend singleton class in java?
Is a char always 1 byte?
How to split a string in java?
When should we create our own custom exception classes?
What happens to the Exception object after handling an exception?
What does flagged out mean?
How does arraylist size increase in java?
What is the base class for error and exception?
What is java ceil?
Where local and global variables are stored?
What is java used for on a computer?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
Why vector class is used?
Can we use both this () and super () in a constructor?
What must a class do to implement an interface in java programming?