logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Can a class be declared as protected?


  • Correct Answer
  • A class can't be declared as protected only methods can be declared as protected 


  • Technology problems


    Search Results


    • 1. Which package is imported by default?
    • Discuss
    • 2. Can a source file contain more than one class declaration?
    • Discuss
    • 3. Does the order of public and static declaration matter in main() method?
    • Discuss
    • 4. Can a main() method be declared final?
    • Discuss
    • 5. What is the argument of main() method?
    • Discuss
    • 6. What is the purpose of declaring a variable as final?
    • Discuss
    • 7. I do not want my class to be inherited by any other class. What should i do?
    • Discuss
    • 8. When will you define a method as static?
    • Discuss
    • 9. How is final different from finally and finalize()?
    • Discuss
    • 10. Which king class properly represents the relationship "King has a best friend who is a Soldier"?

    • Options
    • A. class King extends Soldier { }
    • B. class King implements Soldier { }
    • C. class King { private BestFriend Soldier; }
    • D. class King { private Soldier bestFriend; }
    • Discuss


    Comments

    There are no comments.

Enter a new Comment