logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Can we compile a java program without main?


  • Correct Answer
  • Yes, we can In order to compile a java program, we don't require any main method But to execute a java program we must have a main in it (unless it is an applet or servlet) Because main is the starting point of a java program 


  • Technology problems


    Search Results


    • 1. What is inheritance?
    • Discuss
    • 2. What is encapsulation?
    • Discuss
    • 3. What is the security mechanism used in java?
    • Discuss
    • 4. What is diamond problem?
    • Discuss
    • 5. What is the difference between array and ArrayList ?
    • Discuss
    • 6. What are the restrictions when overriding a method ?
    • Discuss
    • 7. What is difference between Path and Classpath?
    • Discuss
    • 8. What is the impact of declaring a method as final?
    • Discuss
    • 9. What is static initializer block? What is its use?
    • Discuss
    • 10. How does a try statement determine which catch clause should be used to handle an exception?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment