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
What is a variable in java?
What is a concrete classes? Is Java object class is concrete class?
What is the concept of multithreading?
Can we clone singleton class in java?
What are the types of java?
Print Vertical traversal of a Binary Tree.
What is tochararray in java?
What is the technique adopted to create an immutable class?
What are the two basic ways in which classes that can be run as threads may be defined?
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?
How do you compare objects in java?
How to provide security in java
What do bitwise operators do?
Can Exception handling we can handle multiple catch blocks?
What are different type of exceptions in java?