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
How do listeners work?
When should a function throw an exception?
What is instance synchronization?
What is Java Package and which package is imported by default?
What is the difference between pass by reference and pass by pointer?
Why hashset is used in java?
What do you mean by append?
What are the advantages of encapsulation in java?
Is map sorted in java?
Can java object be locked down for exclusive use by a given thread?
How can you handle java exceptions?
Does java set allow duplicates?
Why scanner is used in java?
Why main function is static?
Why can't we use static class instead of singleton?