Multiple choice technology platforms and products

In the package Explorer, which of the following classes we can run directly?

  1. A public class which contains a main method with proper signature (Arguments, return types etc).

  2. We can run any classes

  3. Only those classes which have public no argument constructors.

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To run a Java class directly from the Package Explorer, the class must contain a standard main method with the correct signature (public static void main(String[] args)). Other classes without this entry point cannot be executed directly as standalone applications.