CSE110 Exam 2 part 1 Practice Questions
1. Which of the following reserved words in Java is used to create an instance (object) of a class? a) class b) public c) public or private, either could be used d) import e) new2. The relationship between a class and an object is best described as a) classes are instances of objects b) objects are instances of classes c) objects and classes are the same thing d) classes are programs while objects are variables 3. In a UML diagram for a class: a) classes are represented as rectangles, b) there may be a section containing the name of the class c) there may be a section containing the attributes (data) of the class d) there may be a section containing the methods of the class e) all of the above 4. In Java, “instantiation” means a) Noticing the first time something is used b) Creating a new object c) Creating a new alias to an existing object d) Launching a method e) None of the above 5. A variable whose scope is restricted to the method where it was declared is known as a(n) a) parameter b) global variable c) local variable d) public instance data e) private instance data
Written for
- Institution
-
Arizona State University
- Course
-
CSE110 (CSE110)
Document information
- Uploaded on
- November 4, 2020
- Number of pages
- 9
- Written in
- 2020/2021
- Type
- Exam (elaborations)
- Contains
- Answers
Subjects
- cse110
- cse 110
- cse110 exam 2 part 1
-
cse110 exam 2 part 1 practice questions