Constructor | Method |
does not contain any return type | has a signature of return type, name and the arguments |
should be same as class name | method name can not be same as a class name |
Constructor can be called only once per object | we can call a method n number of times on a particular object |
Integer:default is 0 | Real:default is 0.0 | Character: default is space | Logical: default is false | |
Byte (1 byte) | Float (4 byte) | char (2 byte) | boolean (1 bit) | |
Short (2 byte) | double (8 byte) | |||
Int (4 byte) | ||||
long (8 byte) |