logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is difference between methods and blocks?


  • Correct Answer
  • Method contains name, parameters, return type and executable body But block does not contains name, parameters, return typeIt contains only executable body Methods are executed by method call statements Blocks are executed automatically with class loading and with object creation 


  • Technology problems


    Search Results


    • 1. In a class if private data member is declared then how to get value of that data member?
    • Discuss
    • 2. In a class if private data member is declared then how to set data to that private data member?
    • Discuss
    • 3. What is the differnce among public, protected and package access data?
    • Discuss
    • 4. When this. non-static datamember is compulsory inside non-static method
    • Discuss
    • 5. What is stored in the 'this' reference?
    • Discuss
    • 6. What is Constructor?
    • Discuss
    • 7. How to call argument constructor?
    • Discuss
    • 8. What is different among String, StringBuffer, StringBuilder?
    • Discuss
    • 9. What is wrapping?
    • Discuss
    • 10. What is unwrapping?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment