Constructor is a block of code that allows you to create object of class.
Difference between Constructor and Methods
Constructor do not have abstract, final, static and synchronised access modifiers can have only public, private Where methods can have all of this
Constructor do not have any return types where as methods have return types
The purpose of the constructor is to create the object of class where is the purpose of the method
is to perform any task by executing block of code.
Difference between Constructor and Methods
Constructor do not have abstract, final, static and synchronised access modifiers can have only public, private Where methods can have all of this
Constructor do not have any return types where as methods have return types
The purpose of the constructor is to create the object of class where is the purpose of the method
is to perform any task by executing block of code.
0 comments:
Post a Comment