OCA Chapter 1 Exam Questions & Answers 2023/2024
OCA Chapter 1 Exam Questions & Answers 2023/2024 Defining a Class - ANSWER-Describing parts & characteristics of building blocks. Need to create an object in order to use. Object - ANSWER-Runtime instance of a class in memory Sits on heap and does not have name Cannot be assigned to another object, passed or returned Gets garbage collected Two Primary Elements of Java Classes/Members - ANSWER-Methods & Fields Methods - ANSWER-Functions/Procedures that operate on the state of the variable. Variables - ANSWER-Hold the state of the program, piece of memory that stores data. Need to state variable type along with name Simple Java Class - ANSWER-public class Pet { } Keyword - ANSWER-Word with special meaning Public - ANSWER-Class can be used by other classes Class with a Variable - ANSWER-public class Pet { String name; }
Written for
- Institution
- OCA Chapter 1
- Course
- OCA Chapter 1
Document information
- Uploaded on
- December 16, 2023
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
oca chapter 1
Document also available in package deal