Pregunta:
What is a constructor?
Autor: mirudula laxmiRespuesta:
Constructors are special methods whose name is the same as the class name. The constructors serve the special purpose of initializing the objects. For example, suppose there is a class with the name “MyClass”, then when you instantiate this class, you pass the syntax: MyClass myClassObject = new MyClass();
0 / 5 (0 calificaciones)
1 answer(s) in total