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
Why java is said to be pass-by-value ?
In how many ways we can do exception handling in java?
Can singleton class be serialized?
Why for each loop is used?
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?
Why we override equals() method?
What is a text string?
What is percentage in java?
What is io stream in java?
Explain the concept of hashtables?
What is data movement?
Is sizeof a keyword in java programming?
Why is a singleton bad?
Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls
What are the four corner stones of oop?