1.
The attributes
and the behaviour of an object are
bound together in an entity called :
a) method b) class
c) model d) message
2.
The concept which
lays stress on the essential features to come into view is called :
a) encapsulation b) inheritance
c) polymorphism d) abstraction
3.
The attributes of an
object represent its :
a) state b) behaviour
c) class d) method
4.
The process of
combining data and functions together as a single entity is called :
a) inheritance b) encapsulation
c) classification d) abstraction
5.
An operation/action
can be performed on :
a) a class b) an object
c) a program d) a method
6.
An object’s
_________ and __________ make it
distinct from other objects.
a) security,activity b) state,attributes
c) attributes,behaviour d) behaviour,methods
7.
Which of the
following character is used to include all classes of a package in your source
code ?
a) * b) ?
c) / d) .
8.
System class is
contained in which package ?
a) java.io b) java.util
c) java.net d) java.lang
9.
The arguments of the
function appearing in the statement that calls the function are called :
a) actual parameters b) formal
parameters
c) calling parameters d) none
of the above
10.
The access specifier
, return type and the function signature together is known as :
a) function definition b) function
call
c) function prototype d) function
signature
(1
x 10)
11.
Using the ternary
operator , write a single line of code
that will do the following :
Reduce variable a’s
value by 10 if a’s current value exceeds 100 , otherwise halve a’s value
(2)
12.
Name the wrapper
class for the primitive data type char (1)
13.
Differentiate
between formal parameters and actual parameters. (2)
14.
State two advantages
of object oriented programming approach. (2)
15.
Give a name for the
following :
a) storage locations whose scope is restricted within a
function or within a block of that function.
b) Java interpreter that
converts bytecodes to machine code.
c) The property that
facilitates code reusability. (1
x 3)