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
Written for
- Institution
- Computer Science
- Course
- Computer Science
Document information
- Uploaded on
- April 11, 2024
- Number of pages
- 7
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
computer science
Document also available in package deal