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
What is purpose of applet programming?
How can we use primitive data types as objects?
How to obtain a performance profile of java program
What is the use of using enum to declare a constant?
What restrictions are placed on method overriding in java programming?
How are the elements of a gridbaglayout organized?
What is java reflection?
Can final class have constructor?
What is data member in java?
What is square root in java?
How to perform quicksort in java?
How to use arraylist in java netbeans?
Why is java so important?
What is the difference between iterator and enumeration ?
What are advantages and disadvantages of OOPs?