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


Please Help Members By Posting Answers For Below Questions

What is a variable in java?

506


What is a concrete classes? Is Java object class is concrete class?

485


What is the concept of multithreading?

496


Can we clone singleton class in java?

493


What are the types of java?

585






Print Vertical traversal of a Binary Tree.

583


What is tochararray in java?

480


What is the technique adopted to create an immutable class?

499


What are the two basic ways in which classes that can be run as threads may be defined?

528


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?

612


How do you compare objects in java?

472


How to provide security in java

1774


What do bitwise operators do?

503


Can Exception handling we can handle multiple catch blocks?

622


What are different type of exceptions in java?

525