Crazy Online Tutorial.


Following are the some Advantages of blogsites

  • Easy to find more updates.
  • Notify you via email when post any tutorial.
  • When we do contest then get notification easyly
by

Difference bettween constructor and method

Constructor Method
1. Name of constructor must be same with the name of class 1. For method there is no such type requirement.Methods name can be any kind depends on person choice.
2.In constructor chaining there is no explicitly constructor. Constructor is invoked implicitly 2. Method is invoked explicitly
3. Constructor does not have any return type 3. In method there can be return type and return something
4. Constructor can provides a default constructor if you don't have any constructor 4. java compiler can't provide method

0 comments:

Post a Comment