Computer Science Question and Answer 100% Correct
Computer Science Question and Answer 100% Correct An object - It is a basic element in java program that has values or attributes, giving it a particular state and behaviors, some of which can change or report a state. The action performed by the objects are defined by methods. A class - It is a blueprint from which all objects can be created, it describes a group of objects, thereby defining the object's data type. Constructor - Allocates memory for the object and initializes the data field. 1. Has the same name as a class 2. Has no return type, not even void 3. Has any number of parameters, including no parameters. what is a default constructor? - A constructor without parameters. A class can have only one default constructor. e.g. public Name () What is method? - A metho
Información del documento
- Subido en
- 11 de abril de 2024
- Número de páginas
- 7
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas