A special method used to initialise objects. Constructor is a block of code similar to method Constructor is called when an object of a class is created All Classes have constructors by 'default' Java (JDK) creates a Class Constructor ,you need not to create a Class constructor Accept parameters to initialise Object properties It is used to set default or user-defined values for the object's attr

Constructor in Java
PRIYA K·Dev.to··1 min read
D
Continue reading on Dev.to
This article was sourced from Dev.to's RSS feed. Visit the original for the complete story.