logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • I want to print "Hello" even before main() is executed. How will you acheive that?


  • Correct Answer
  • Print the statement inside a static block of code Static blocks get executed when the class gets loaded into the memory and even before the creation of an object Hence it will be executed before the main() method And it will be executed only once 


  • Technology problems


    Search Results


    • 1. What is PHP?s configuration file called ?
    • Discuss
    • 2. What is the diff between RDO and ADO?
    • Discuss
    • 3. What is the difference between ADODC and ADODB?
    • Discuss
    • 4. Define what is a Fact, Dimension and Measure ?
    • Discuss
    • 5. What are the tasks of a Business Analyst in Software Development Life Cycle?
    • Discuss
    • 6. What are the restriction imposed on a static method or a static block of code?
    • Discuss
    • 7. What is the difference between Serial and Throughput Garbage collector ?
    • Discuss
    • 8. When do you override hashcode and equals() ?
    • Discuss
    • 9. Which of the following are capabilities of functions in JavaScript?

    • Options
    • A. Accept parameters
    • B. Return a value
    • C. Accept parameters and Return a value
    • D. None of the above
    • Discuss
    • 10. Explain different layers which define cloud architecture
    • Discuss


    Comments

    There are no comments.

Enter a new Comment