class test
{
private static void main(String []adsf)
{
}
}
explain me that the above code is error or exception
Answer Posted / bhargava
Code will throw exception. Because usually every stand
alone program execution should start with main method. It
should be public other wise this method doesnt exposed to
out side to run.
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
Difference difference paint() and paintcomponent()?
What are the differences between throw and throws?
What is an empty list in java?
Can we inherit a class with private constructor?
What is the generic class?
What does exp mean in math?
What are the advantages of compiled language?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
What is the difference between call by reference and call by pointer?
Can static method access instance variables ?
What is a default constructor and also define copy contrucyor?
Why chararray() is preferred over string to store the password?
What do you mean by constant time complexity?
what is encapsulation in java? Explain
What is the difference between a loader and a compiler?