0% found this document useful (0 votes)
93 views12 pages

OOP LABQ1 and 2

In Java, a character constant’s value is its integer value in the Unicode character set.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views12 pages

OOP LABQ1 and 2

In Java, a character constant’s value is its integer value in the Unicode character set.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

In Java, a character constant’s value is its integer value in the _________character set.

a.
Unicode

b.
ASCII

c.
Binary

d.
 EBCDIC           
Feedback
Your answer is correct.

Question 2
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which of the following is not a component of Java Integrated Development Environment
(IDE)?

a.
Net Beans

b.
Microsoft Visual Fox Pro

c.
Borland’s Jbuilder

d.
Symantec’s Visual Café
Feedback
Your answer is correct.
Question 3
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which one presents a uniform, easy-to-use, object-oriented interface between the program
and the input/output devices : 

a.
Stream

b.
Input

c.
Ouptput

d.
Reader
Feedback
Your answer is correct.

Question 4
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which is not feature of OOP in general definitions - 

a.
Code reusability

b.
Modularity

c.
Efficient Code

d.
Duplicate/Redundant data
Feedback
Your answer is correct.

Question 5
Correct
Mark 2.00 out of 2.00

Flag question

Question text
The default value of a static integer  variable of a class in Java is - 

a.
Garbage Value

b.
1

c.
0

d.
-1
Feedback
Your answer is correct.

Question 6
Correct
Mark 2.00 out of 2.00

Flag question

Question text
 All syntax errors are known as following errors : 
a.
Compile-time

b.
Logical

c.
Exception

d.
Run-time
Feedback
Your answer is correct.

Question 7
Correct
Mark 2.00 out of 2.00

Flag question

Question text
The java run time system automatically calls this method while garbage collection-

a.
finalizer()                    

b.
finalize()   

c.
finalized()    

d.
finally()
Feedback
Your answer is correct.
Question 8
Correct
Mark 2.00 out of 2.00

Flag question

Question text
When an overridden method is called from within a subclass, it will always  refer to the
version of that     method defined by the -

a.
Compiler will choose randomly  

b.
Subclass

c.
Interpreter will choose

d.
Super class
Feedback
Your answer is correct.

Question 9
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which was the first purely object oriented programming language developed?

a.
Java

b.
C++

c.
SmallTalk

d.
Kotlin
Feedback
Your answer is correct.

Question 10
Correct
Mark 2.00 out of 2.00

Flag question

Question text
In java, objects are passed as - 

a.
Memory address

b.
Constructor

c.
Copy of that object

d.
Method called call by value

In Object Oriented Programming the mechanism of deriving a new class from an old one is
called - 

a.
Method overriding

b.
Method overloading

c.
Inheritance

d.
Operator overloading
Feedback
Your answer is correct.

Question 2
Correct
Mark 2.00 out of 2.00

Flag question

Question text
What method is used to find the nth no. of character of given string s1. ?

a.

s1.index

b.

s1.substring

c.

s1.charAt

d.
s1.length()
Feedback
Your answer is correct.

Question 3
Correct
Mark 2.00 out of 2.00

Flag question

Question text
  What keyword is used in Java to define a constant?
a.
private

b.
final

c.
abstract

d.
static
Feedback
Your answer is correct.

Question 4
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Consider the following statement(s) about Java:
I.     All white-space characters (blanks) are ignored by the compiler.
II.     Java keywords can be used as variable names.
III.    An identifier does not begin with a digit and does not contain any spaces.
IV.   The execution of Java applications begins at method main.
Which of them is correct?

a.
(III) and (IV) above

b.
Both (I) and (III) above

c.
Both (II) and  (IV) above

d.
Both (I) and (II) above 
Feedback
Your answer is correct.

Question 5
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which one is true about a constructor ?

a.
A constructor is used to create objects.

b.
All of the above

c.
A constructor must have the same name as the class it is declared within.

d.
A constructor may be declared private
Feedback
Your answer is correct.

Question 6
Correct
Mark 2.00 out of 2.00

Flag question

Question text
In a class definition, the special method provided to be called to create an instance of that
class is known as a/an -
a.
Object

b.
Destructor

c.
Constructor

d.
Interpreter
Feedback
Your answer is correct.

Question 7
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Re-implementing an inherited method in a sub class to perform a different task from the
parent class is called - 

a.
Binding

b.
Hiding

c.
extending

d.
Coupling
Feedback
Your answer is correct.

Question 8
Correct
Mark 2.00 out of 2.00

Flag question

Question text
If two methods have same name but different parameter list then it is called what -

a.
Method overloading

b.
Method overriding

c.
Operator overloading

d.
None of these
Feedback
Your answer is correct.

Question 9
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which one is a template for creating different objects ?

a.
Interface

b.
A Class

c.
An Array
d.
Method
Feedback
Your answer is correct.

Question 10
Correct
Mark 2.00 out of 2.00

Flag question

Question text
Which among the following best describes multiple inheritance?

a.
Only one class being parent of single child

b.
Only one class being parent of other child classes

c.
More than one class being parent of single child

d.
More than one class being parent of other child classes

You might also like