logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is the purpose of declaring a variable as final?


  • Correct Answer
  • A final variable's value can't be changed final variables should be initialized before using them 


  • Technology problems


    Search Results


    • 1. Can a class be declared as protected?
    • Discuss
    • 2. Which package is imported by default?
    • Discuss
    • 3. Can a source file contain more than one class declaration?
    • Discuss
    • 4. Does the order of public and static declaration matter in main() method?
    • Discuss
    • 5. Can a main() method be declared final?
    • Discuss
    • 6. I do not want my class to be inherited by any other class. What should i do?
    • Discuss
    • 7. When will you define a method as static?
    • Discuss
    • 8. How is final different from finally and finalize()?
    • Discuss
    • 9. 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
    • 10. How many of the following will follow JavaBean Listener naming rules? addListener addMouseListener deleteMouseListener removeMouseListener registerMouseListener

    • Options
    • A. 1
    • B. 2
    • C. 3
    • D. 4
    • Discuss


    Comments

    There are no comments.

Enter a new Comment