I have a small test on Constructors in JAVA tommorow. Can anyone help me understand what is a constructor and what are the uses?
In object-oriented programming, a constructor (sometimes shortened to ctor) in a class is a special type of subroutine called to create an object. It has same name as the class name and is used for quick initialization of objects .
i knw wat it is in oops.. if itz d same its like a class.. it must have d same name as dat of d class and is used to create an object..
yup,java is OOPS only.
i don't understand. isn't that two different programming language??
which two?
oops and java??
OOPS is a category and Java is a language under that category. There are mainly two types of categories, POP (Procedure Oriented Programming) And OOPS(The one we are talking about) Java,C++,etc come under OOPS.
Join our real-time social learning platform and learn together with your friends!