Verified
1. Having multiple class methods of the same
a) method overloading
name where each method has a different
number of or type of parameters is known as
a) method overloading
b) Encapsulation
c)importing
d) information hiding
e) encapsulation
2. The relationship between a class and an object is best a) objects are
instances of
described as classes
a) objects are instances of classes
b) classes are instances of objects
c)classes are programs while objects are
variables
d) objects and classes are the same thing
e) objects are the instance data of classes
3. To define a class that will represent a car, which of the e) public
class Car
following definitions is most appropriate?
a) public class CAR
b) public class car
c)private class car
d) private class Car
e) public class Car
4. Which of the following reserved words in Java a) new
is used to create an instance of a class? b) public
, CSE 205 Final Exam Complete Questions And Answers |
Verified
a) new
, CSE 205 Final Exam Complete Questions And Answers |
Verified
c)public or private, either could be used
d) class
e) import
5. What does acronym API stands for? b) Application
a) Application Parameter Internet Program- ming
b) Application Programming Interface Interface
c)Apply Programming Interactive
d) Abstraction Programming Interface
6. A class' constructor usually defines
a) how an object is initial-
a) how an object is initialized ized
b) how an object is interfaced
c)if the instance data are accessible outside
of the object directly
d) the number of methods in the class
e) the number of instance data in the class
7. Java methods can return only primitive types (int, dou- False
ble, float, char, boolean, etc).
True
Fals
e
8. All Java classes must contain a main method False
which is the first method executed when the
Java class is called upon.
True
Fals
e
, CSE 205 Final Exam Complete Questions And Answers |
Verified
9.