Why do we use public static with the main function in Java?
Answer Posted / rameshreddy.k
As we know public means we can access the method from
anywhere. in a java we want call method by using class
object. But main() is also method .that main() is there one
class but jVM execute program trough main() method with out
creating object main() method call thats way we use public
static the main function
thanks& regargs
RAMESH
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is the meaning of 3 dots in java?
What are bind parameters?
How will you reverse a singly-link list?
What is meant by null and void?
Which sorting algorithm is in place?
How do you create immutable object in java?
How to make a write-only class in java?
Explain working of call by reference function invoking.
what is the messsage u r going to get from an objectoriented programing?
What is difference between next () and nextline () in java?
Is empty string in java?
Why is stringbuffer not immutable?
Explain heap sort?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
Can we execute a program without main?