logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Can a source file contain more than one class declaration?


  • Correct Answer
  • Yes a single source file can contain any number of Class declarations but only one of the class can be declared as public 


  • Technology problems


    Search Results


    • 1. Does the order of public and static declaration matter in main() method?
    • Discuss
    • 2. Can a main() method be declared final?
    • Discuss
    • 3. What is the argument of main() method?
    • Discuss
    • 4. What is the return type of the main() method?
    • Discuss
    • 5. Why is the main() method declared static?
    • Discuss
    • 6. Which package is imported by default?
    • Discuss
    • 7. Can a class be declared as protected?
    • Discuss
    • 8. What is the purpose of declaring a variable as final?
    • Discuss
    • 9. I do not want my class to be inherited by any other class. What should i do?
    • Discuss
    • 10. When will you define a method as static?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment