logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is static initializer block? What is its use?


  • Correct Answer
  • A static initializer block is a block of code that declares with the static keyword It normally contains the block of code that must execute at the time of class loading The static initializer block will execute only once at the time of loading the class only 


  • Technology problems


    Search Results


    • 1. What is the impact of declaring a method as final?
    • Discuss
    • 2. What is difference between Path and Classpath?
    • Discuss
    • 3. What are the restrictions when overriding a method ?
    • Discuss
    • 4. Can we compile a java program without main?
    • Discuss
    • 5. What is inheritance?
    • Discuss
    • 6. How does a try statement determine which catch clause should be used to handle an exception?
    • Discuss
    • 7. What are the the different ways for creating a thread?
    • Discuss
    • 8. What is the difference between creating a thread by extending Thread class and by implementing Runnable interface? Which one should prefer?
    • Discuss
    • 9. What is Thread ?
    • Discuss
    • 10. What do you understand by private, protected and public?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment