Java Constructor

Java Constructor

Constructor

In this lesson we discuss about Java constructor.

what is Java constructor-
In Java Constructor is a spacial type method that is used to initialize the object.
Why We Create Java Constructor-
When a object is instantiated(when you use new keyword) then the constructor initialize the newly created object.
Rules-

Java basically  two rules defined for the constructor.

1. Constructor name must be the same name as its class name.
2. Constructor must have no return type.

Staff
Administrator-training-training-technist
Vivek Agarwal
Read More





Skip to toolbar
  • USA : +1-(917) 328-1140
  • UK : +44-(773) 940-0806
  • INDIA : +91-(779) 205-1814
  • KUWAIT : +965-(514) 31-431
  • DUBAI : +971-(557) 964-969
  • MALAYSIA : +91-(779) 205-1814
  • AUSTRAILIA : +91-(779) 205-1814