SlideShare a Scribd company logo
1 of 45
Download to read offline
MCQs BANK
Page: 1
Object Oriented
Programming
Topic: Basic OOP concepts
Instructions:
This MCQs Bank contains question
and solution on adjacent(even-odd)
pages. First try to solve the MCQ by
yourself, then look for the solution.
Best viewed in “single page view”
in PDF viewer.
MCQs BANK No.: 2
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 1
When you program for the Java
platform, you write source code in
_________ files. Fill in the blank.
a) .class
b) .cpp
c) .java
d) .html
Page: 2
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 1 (Solution)
Ans: c) .java
Explanation:
When you program for the Java
platform, you write source code in
.java files and then compile them.
Page: 3
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 2
The java compiler checks your java
code against the language's syntax
rules, then writes out bytecodes in
________ files. Fill in the blank.
a) .class
b) .java
c) .exe
d) .obj
Page: 4
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 2 (Solution)
Ans: a) .class
Explanation: The compiler checks
your code against the language's
syntax rules, then writes out
bytecodes in .class files.
Page: 5
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 3
Which of the following files the
JVM(Java virtual machine) reads
and interprets?
a) .class
b) .java
c) .exe
d) .obj
Page: 6
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 3 (Solution)
Ans: a) .class
Explanation:
At run time, the JVM reads and
interprets .class files and executes
the program's instructions on the
native hardware platform for which
the JVM was written.
Page: 7
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 4
Identify the correct match
combination.
a) 1-x, 2-w, 3-z, 4-y
b) 1-w, 2-x, 3-z, 4-y
c) 1-x, 2-w, 3-y, 4-z
d) 1-y, 2-w, 3-z, 4-x
Page: 8
1) JVM w) Implicit memory
management
2) Garbage
collection
x) Bytecode
3) Objects y) Pool of memory
4) Heap z) Instance variables
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 4 (Solution)
Ans: a) 1-x, 2-w, 3-z, 4-y
Explanation: At run time, the JVM reads
and interprets Bytecode ( in .class files) and
executes the program's instructions on the
native hardware platform for which the JVM
was written.
When your Java application creates an object
instance at run time, the JVM automatically
allocates memory space for that object from
the heap, which is a pool of memory set
aside for your program to use. The Java
garbage collector runs in the background,
keeping track of which objects the application
no longer needs and reclaiming memory from
them. This approach to memory handling is
called implicit memory management because
it doesn't require you to write any memory-
handling code. Data field members of an
object is called instance variables.
Page: 9
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 5
Which of the following process is
used by objects for communication
and coordination.
a) method calling
b) shared memory
c) stack
d) interpreter
Page: 10
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 5 (Solution)
Ans: a) method calling
Explanation: Objects talk to other
objects by sending messages
(method calls in the Java language).
Page: 11
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 6
____________ access means the
object's attributes are accessible
only within the object itself. Fill in
the blank.
a) private
b) public
c) protected
d) default
Page: 12
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 6 (Solution)
Ans: a) private
Explanation:
On the Java platform, you can use
access specifiers to vary the
nature of object relationships from
public to private.
Public access is wide open,
whereas private access means the
object's attributes are accessible
only within the object itself.
Page: 13
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 7
OOP introduces the concept of
inheritance, where a subclass can
"copy" the attributes and behavior of
the super class. If some of those
attributes or behaviors need to
changed in subclass, then you need
to __________ them. Fill in the
blank.
a) overload
b) override
c) delete
d) integrate
Page: 14
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 7 (Solution)
Ans: b) override
Explanation:
Overriding is a feature that allows a
subclass or child class to provide a
specific implementation of a method
that is already provided by one of its
super-classes or parent classes.
You only change what you need to
change in order to create
specialized objects.
Page: 15
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 8
Which of the following is a
fundamental feature of object-
oriented programming language?
a) automatic garbage collection
b) creating objects and manipulating
objects
c) platform independence
d) all of the above
Page: 16
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 8 (Solution)
Ans: b) creating objects and
manipulating objects
Explanation:
Object-oriented programming is
centered on creating objects,
manipulating objects, and making
objects work together.
This allows you to create modular
programs and reusable code. It is the
fundamental feature of Object-oriented
programming languages.
Automatic garbage collection and
platform independence are features
specific to java(not present in all OOP
language, such as C++).
Page: 17
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 9
Which of the following gives
platform independence to java
programs?
a) Bytecode
b) JVM
c) Both (a) and (b)
d) None of these
Page: 18
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 9 (Solution)
Ans: c) Both (a) and (b)
Explanation: JVM is needed in
order to run Java programs. The
programs are compiled into Java
Virtual Machine code called
bytecode.
The bytecode is machine
independent and is able to run on
any machine that has a Java Virtual
Machine. With Java, the program
need only be compiled once, and the
bytecode generated by the Java
compiler can run on any platform.
Page: 19
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 10
______________ is the capability for
a program to perform several tasks
simultaneously within a program. Fill
in the blank.
a) Polymorphism
b) Multithreading
c) Exception Handling
d) Platform Independence
Page: 20
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 10 (Solution)
Ans: b) Multithreading
Explanation:
Multithreading is the capability for a
program to perform several tasks
simultaneously within a program. In
Java, multithreaded programming
has been smoothly integrated into it,
while in other languages, operating
system-specific procedures have to
be called in order to enable
multithreading. Multithreading is a
necessity in visual and network -
programming.
Page: 21
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 11
Consider the following 2
statements(S1 and S2).
(S1) byte data type is a 8-bit signed
two's complement integer.
(S2) Default value is 0.
Which of the following is correct.
a) S1 is TRUE and S2 is FALSE
b) S1 is FALSE and S2 is TRUE
c) Both S1 and S2 are TRUE
d) Both S1 and S2 are FALSE
Page: 22
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 11 (Solution)
Ans: c) Both S1 and S2 are TRUE
Explanation:
byte data type is a 8-bit signed two's
complement integer.
Minimum value is -128 (-2^7)
Maximum value is 127
(inclusive)(2^7 -1)
Default value is 0
Page: 23
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 12
byte data type in java is used to
save space in large arrays, mainly
in place of integers, since a byte is
______ times smaller than an int.
Fill in the blank.
a) two
b) three
c) four
d) eight
Page: 24
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 12 (Solution)
Ans: c) four
Explanation:
Byte data type is used to save space
in large arrays, mainly in place of
integers, since a byte is four times
smaller than an int.
Int data type is a 32-bit signed two's
complement integer in java.
Page: 25
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 13
Consider the following 2
statements(S1 and S2).
(S1) short data type is a 16-bit
signed two's complement integer.
(S2) Default value is 1.
Which of the following is correct.
a) S1 is TRUE and S2 is FALSE
b) S1 is FALSE and S2 is TRUE
c) Both S1 and S2 are TRUE
d) Both S1 and S2 are FALSE
Page: 26
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 13 (Solution)
Ans: a) S1 is TRUE and S2 is FALSE
Explanation:
Short data type is a 16-bit signed
two's complement integer.
Minimum value is -32,768 (-2^15)
Maximum value is 32,767(inclusive)
(2^15 -1)
Default value is 0.
Example :
short s= 10000 , short r = -20000
Page: 27
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 14
Short data type can also be used
to save memory as byte data type.
A short is ____ times smaller than
an int. Fill in the blank.
a) 2
b) 3
c) 4
d) 8
Page: 28
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 14 (Solution)
Ans: a) 2
Explanation:
Short data type can also be used to
save memory as byte data type. A
short is 2 times smaller than an int.
int is of 32 bit whereas short is of 16
bit.
Page: 29
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 15
Long data type is a ________
signed two's complement integer.
Fill in the blank.
a) 8 bit
b) 16 bit
c) 32 bit
d) 64 bit
Page: 30
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 15 (Solution)
Ans: d) 64 bit
Explanation:
Long data type is a 64-bit signed
two's complement integer. This type
is used when a wider range than int
is needed.
Page: 31
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 16
Consider the following 2
statements(S1 and S2).
(S1) int data type is a 32-bit signed
two's complement integer.
(S2) Default value is 1.
Which of the following is correct.
a) S1 is TRUE and S2 is FALSE
b) S1 is FALSE and S2 is TRUE
c) Both S1 and S2 are TRUE
d) Both S1 and S2 are FALSE
Page: 32
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 16 (Solution)
Ans: a) S1 is TRUE and S2 is FALSE
Explanation:
Int data type is a 32-bit signed two's
complement integer.
Int is generally used as the default
data type for integral values unless
there is a concern about memory.
The default value is 0.
Example :
int a = 100000, int b = -200000
Page: 33
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 17
Which among the following data
types in JAVA has the largest
memory size?
a) int
b) short
c) byte
d) long
Page: 34
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 17 (Solution)
Ans: d) long
Explanation:
Long data type is a 64-bit signed
two's complement integer.
This type is used when a wider
range than int is needed. Short is 16
bit in size. Byte 8 bit and int is 32 bit
in size.
Page: 35
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 18
Consider the following 2
statements(S1 and S2).
(S1) float data type is a single-
precision 32-bit floating point.
(S2) double data type is a double-
precision 64-bit floating point.
Which of the following is correct.
a) S1 is TRUE and S2 is FALSE
b) S1 is FALSE and S2 is TRUE
c) Both S1 and S2 are TRUE
d) Both S1 and S2 are FALSE
Page: 36
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 18 (Solution)
Ans: c) Both S1 and S2 are TRUE
Explanation:
Float data type is a single-precision 32-bit
floating point.
Float is mainly used to save memory in
large arrays of floating point numbers.
Default value is 0.0f.
Example : float f1 = 234.5f
double data type is a double-precision 64-
bit floating point.
This data type is generally used as the
default data type for decimal values.
generally the default choice.
Default value is 0.0d.
Example : double d1 = 123.4
Page: 37
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 19
Consider the following 2
statements(S1 and S2).
(S1) boolean data type represents
one bit of information
(S2) There are only two possible
values of boolean data type : true
and false.
Which of the following is correct.
a) S1 is TRUE and S2 is FALSE
b) S1 is FALSE and S2 is TRUE
c) Both S1 and S2 are TRUE
d) Both S1 and S2 are FALSE
Page: 38
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 19 (Solution)
Ans: c) Both S1 and S2 are TRUE
Explanation:
boolean data type represents one bit
of information.
There are only two possible values :
true and false.
This data type is used for simple flags
that track true/false conditions.
Default value is false.
Example : boolean one = true
Page: 39
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 20
char data type in java is a single
__________ Unicode character.
Fill in the blank.
a) 8-bit
b) 16-bit
c) 32-bit
d) 64-bit
Page: 40
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 20 (Solution)
Ans: b) 16-bit
Explanation: char data type is a single
16-bit Unicode character.
Minimum value is 'u0000' (or 0).
Maximum value is 'uffff' (or 65,535
inclusive).
Char data type is used to store any
character.
Example . char letterA ='A'.
Unicode is a 16-bit character encoding
standard and is capable to represent
almost every character of well-known
languages of the world. Before Unicode,
there were multiple standards to
represent character encoding − ASCII -
for the United States.
Page: 41
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 21
What is the default value of
boolean data type in Java?
a) 1
b) 0
c) true
d) false
Page: 42
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 21 (Solution)
Ans: d) false
Explanation:
boolean data type represents one bit
of information.
There are only two possible values :
true and false.
This data type is used for simple
flags that track true/false conditions.
Default value is false.
Page: 43
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 22
What is the default value of a
reference variable in java?
a) Garbage Value
b) Null Value
c) Zero
d) One
Page: 44
MCQs Bank on Object Oriented Programming
Topic: Basic OOP concepts
MCQ No: 22 (Solution)
Ans: b) Null Value
Explanation:
Reference variable is used to point
object/values. Classes, interfaces,
arrays, enumerations, and,
annotations are reference types in
Java. In simple words, a reference
variable holds a reference to
information related to that variable. A
reference is an address that indicates
where an object's variables and
methods are stored.
Default value of any reference
variable is null.
Page: 45

More Related Content

What's hot

Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...Kuntal Bhowmick
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword pptVinod Kumar
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++Bhavik Vashi
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in javaNilesh Dalvi
 
Object-oriented Programming-with C#
Object-oriented Programming-with C#Object-oriented Programming-with C#
Object-oriented Programming-with C#Doncho Minkov
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1 UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1 Knowledge Center Computer
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manualsameer farooq
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteTushar B Kute
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Michelle Anne Meralpis
 
Java - Exception Handling Concepts
Java - Exception Handling ConceptsJava - Exception Handling Concepts
Java - Exception Handling ConceptsVicter Paul
 
11 lec 11 storage class
11 lec 11 storage class11 lec 11 storage class
11 lec 11 storage classkapil078
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++Nilesh Dalvi
 

What's hot (20)

Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
 
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 1 -- int...
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword ppt
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in java
 
Object-oriented Programming-with C#
Object-oriented Programming-with C#Object-oriented Programming-with C#
Object-oriented Programming-with C#
 
C# basics
 C# basics C# basics
C# basics
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 
Oops in java
Oops in javaOops in java
Oops in java
 
C# classes objects
C#  classes objectsC#  classes objects
C# classes objects
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1 UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Java - Exception Handling Concepts
Java - Exception Handling ConceptsJava - Exception Handling Concepts
Java - Exception Handling Concepts
 
C# Private assembly
C# Private assemblyC# Private assembly
C# Private assembly
 
11 lec 11 storage class
11 lec 11 storage class11 lec 11 storage class
11 lec 11 storage class
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++
 
Inheritance and polymorphism
Inheritance and polymorphism   Inheritance and polymorphism
Inheritance and polymorphism
 

Similar to Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- basic oop concepts

Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...Kuntal Bhowmick
 
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loopsMultiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loopsKuntal Bhowmick
 
50 common web developer interview questions [2020 updated] [www.full stack....
50 common web developer interview questions [2020 updated]   [www.full stack....50 common web developer interview questions [2020 updated]   [www.full stack....
50 common web developer interview questions [2020 updated] [www.full stack....Alex Ershov
 
Learning to Spot and Refactor Inconsistent Method Names
Learning to Spot and Refactor Inconsistent Method NamesLearning to Spot and Refactor Inconsistent Method Names
Learning to Spot and Refactor Inconsistent Method NamesDongsun Kim
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...Alessandro Confetti
 
ASE2023_SCPatcher_Presentation_V5.pptx
ASE2023_SCPatcher_Presentation_V5.pptxASE2023_SCPatcher_Presentation_V5.pptx
ASE2023_SCPatcher_Presentation_V5.pptxjzyNick
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...Kuntal Bhowmick
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Projects
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012Wingston
 
Bt0074 oop with java
Bt0074   oop with javaBt0074   oop with java
Bt0074 oop with javasmumbahelp
 
The Little Unicorn That Could
The Little Unicorn That CouldThe Little Unicorn That Could
The Little Unicorn That CouldPVS-Studio
 
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...NicheTech Com. Solutions Pvt. Ltd.
 
alphablues - ML applied to text and image in chat bots
alphablues - ML applied to text and image in chat botsalphablues - ML applied to text and image in chat bots
alphablues - ML applied to text and image in chat botsAndré Karpištšenko
 
Don't Call It a Comeback: Attribute Grammars for Big Data Visualization
Don't Call It a Comeback: Attribute Grammars for Big Data VisualizationDon't Call It a Comeback: Attribute Grammars for Big Data Visualization
Don't Call It a Comeback: Attribute Grammars for Big Data VisualizationLeo Meyerovich
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)John Smith
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Wes Yanaga
 

Similar to Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- basic oop concepts (20)

Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
Multiple Choice Questions on JAVA (object oriented programming) bank 3 -- cla...
 
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
Multiple Choice Questions on JAVA (object oriented programming) bank 5 -- mem...
 
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loopsMultiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
Multiple Choice Questions on JAVA (object oriented programming) bank 4 -- loops
 
50 common web developer interview questions [2020 updated] [www.full stack....
50 common web developer interview questions [2020 updated]   [www.full stack....50 common web developer interview questions [2020 updated]   [www.full stack....
50 common web developer interview questions [2020 updated] [www.full stack....
 
Learning to Spot and Refactor Inconsistent Method Names
Learning to Spot and Refactor Inconsistent Method NamesLearning to Spot and Refactor Inconsistent Method Names
Learning to Spot and Refactor Inconsistent Method Names
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
 
ASE2023_SCPatcher_Presentation_V5.pptx
ASE2023_SCPatcher_Presentation_V5.pptxASE2023_SCPatcher_Presentation_V5.pptx
ASE2023_SCPatcher_Presentation_V5.pptx
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
Multiple Choice Questions on JAVA (object oriented programming) bank 8 -- int...
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and Answers
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012
 
Bt0074 oop with java
Bt0074   oop with javaBt0074   oop with java
Bt0074 oop with java
 
Portfolio
PortfolioPortfolio
Portfolio
 
The Little Unicorn That Could
The Little Unicorn That CouldThe Little Unicorn That Could
The Little Unicorn That Could
 
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
 
alphablues - ML applied to text and image in chat bots
alphablues - ML applied to text and image in chat botsalphablues - ML applied to text and image in chat bots
alphablues - ML applied to text and image in chat bots
 
Don't Call It a Comeback: Attribute Grammars for Big Data Visualization
Don't Call It a Comeback: Attribute Grammars for Big Data VisualizationDon't Call It a Comeback: Attribute Grammars for Big Data Visualization
Don't Call It a Comeback: Attribute Grammars for Big Data Visualization
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 

More from Kuntal Bhowmick

Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Kuntal Bhowmick
 
1. introduction to E-commerce
1. introduction to E-commerce1. introduction to E-commerce
1. introduction to E-commerceKuntal Bhowmick
 
Computer graphics question for exam solved
Computer graphics question for exam solvedComputer graphics question for exam solved
Computer graphics question for exam solvedKuntal Bhowmick
 
DBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsDBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsKuntal Bhowmick
 
Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interviewKuntal Bhowmick
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview QuestionsKuntal Bhowmick
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview QuestionsKuntal Bhowmick
 
Computer Network Interview Questions
Computer Network Interview QuestionsComputer Network Interview Questions
Computer Network Interview QuestionsKuntal Bhowmick
 
Distributed operating systems cs704 a class test
Distributed operating systems cs704 a class testDistributed operating systems cs704 a class test
Distributed operating systems cs704 a class testKuntal Bhowmick
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solutionKuntal Bhowmick
 
CS291(C Programming) assignment
CS291(C Programming) assignmentCS291(C Programming) assignment
CS291(C Programming) assignmentKuntal Bhowmick
 
Shell script assignment 3
Shell script assignment 3Shell script assignment 3
Shell script assignment 3Kuntal Bhowmick
 
Basic shell programs assignment 1
Basic shell programs assignment 1Basic shell programs assignment 1
Basic shell programs assignment 1Kuntal Bhowmick
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualKuntal Bhowmick
 
Shell programming assignment 2
Shell programming assignment 2Shell programming assignment 2
Shell programming assignment 2Kuntal Bhowmick
 
Solution manual of shell programming assignment 2
Solution manual of shell programming assignment 2Solution manual of shell programming assignment 2
Solution manual of shell programming assignment 2Kuntal Bhowmick
 

More from Kuntal Bhowmick (20)

Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
 
1. introduction to E-commerce
1. introduction to E-commerce1. introduction to E-commerce
1. introduction to E-commerce
 
Computer graphics question for exam solved
Computer graphics question for exam solvedComputer graphics question for exam solved
Computer graphics question for exam solved
 
DBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental conceptsDBMS and Rdbms fundamental concepts
DBMS and Rdbms fundamental concepts
 
Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interview
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview Questions
 
Computer Network Interview Questions
Computer Network Interview QuestionsComputer Network Interview Questions
Computer Network Interview Questions
 
C interview questions
C interview  questionsC interview  questions
C interview questions
 
C question
C questionC question
C question
 
Distributed operating systems cs704 a class test
Distributed operating systems cs704 a class testDistributed operating systems cs704 a class test
Distributed operating systems cs704 a class test
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solution
 
CS291(C Programming) assignment
CS291(C Programming) assignmentCS291(C Programming) assignment
CS291(C Programming) assignment
 
C programming guide new
C programming guide newC programming guide new
C programming guide new
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
Shell script assignment 3
Shell script assignment 3Shell script assignment 3
Shell script assignment 3
 
Basic shell programs assignment 1
Basic shell programs assignment 1Basic shell programs assignment 1
Basic shell programs assignment 1
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manual
 
Shell programming assignment 2
Shell programming assignment 2Shell programming assignment 2
Shell programming assignment 2
 
Solution manual of shell programming assignment 2
Solution manual of shell programming assignment 2Solution manual of shell programming assignment 2
Solution manual of shell programming assignment 2
 

Recently uploaded

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 

Recently uploaded (20)

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 

Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- basic oop concepts

  • 1. MCQs BANK Page: 1 Object Oriented Programming Topic: Basic OOP concepts Instructions: This MCQs Bank contains question and solution on adjacent(even-odd) pages. First try to solve the MCQ by yourself, then look for the solution. Best viewed in “single page view” in PDF viewer. MCQs BANK No.: 2
  • 2. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 1 When you program for the Java platform, you write source code in _________ files. Fill in the blank. a) .class b) .cpp c) .java d) .html Page: 2
  • 3. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 1 (Solution) Ans: c) .java Explanation: When you program for the Java platform, you write source code in .java files and then compile them. Page: 3
  • 4. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 2 The java compiler checks your java code against the language's syntax rules, then writes out bytecodes in ________ files. Fill in the blank. a) .class b) .java c) .exe d) .obj Page: 4
  • 5. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 2 (Solution) Ans: a) .class Explanation: The compiler checks your code against the language's syntax rules, then writes out bytecodes in .class files. Page: 5
  • 6. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 3 Which of the following files the JVM(Java virtual machine) reads and interprets? a) .class b) .java c) .exe d) .obj Page: 6
  • 7. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 3 (Solution) Ans: a) .class Explanation: At run time, the JVM reads and interprets .class files and executes the program's instructions on the native hardware platform for which the JVM was written. Page: 7
  • 8. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 4 Identify the correct match combination. a) 1-x, 2-w, 3-z, 4-y b) 1-w, 2-x, 3-z, 4-y c) 1-x, 2-w, 3-y, 4-z d) 1-y, 2-w, 3-z, 4-x Page: 8 1) JVM w) Implicit memory management 2) Garbage collection x) Bytecode 3) Objects y) Pool of memory 4) Heap z) Instance variables
  • 9. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 4 (Solution) Ans: a) 1-x, 2-w, 3-z, 4-y Explanation: At run time, the JVM reads and interprets Bytecode ( in .class files) and executes the program's instructions on the native hardware platform for which the JVM was written. When your Java application creates an object instance at run time, the JVM automatically allocates memory space for that object from the heap, which is a pool of memory set aside for your program to use. The Java garbage collector runs in the background, keeping track of which objects the application no longer needs and reclaiming memory from them. This approach to memory handling is called implicit memory management because it doesn't require you to write any memory- handling code. Data field members of an object is called instance variables. Page: 9
  • 10. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 5 Which of the following process is used by objects for communication and coordination. a) method calling b) shared memory c) stack d) interpreter Page: 10
  • 11. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 5 (Solution) Ans: a) method calling Explanation: Objects talk to other objects by sending messages (method calls in the Java language). Page: 11
  • 12. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 6 ____________ access means the object's attributes are accessible only within the object itself. Fill in the blank. a) private b) public c) protected d) default Page: 12
  • 13. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 6 (Solution) Ans: a) private Explanation: On the Java platform, you can use access specifiers to vary the nature of object relationships from public to private. Public access is wide open, whereas private access means the object's attributes are accessible only within the object itself. Page: 13
  • 14. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 7 OOP introduces the concept of inheritance, where a subclass can "copy" the attributes and behavior of the super class. If some of those attributes or behaviors need to changed in subclass, then you need to __________ them. Fill in the blank. a) overload b) override c) delete d) integrate Page: 14
  • 15. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 7 (Solution) Ans: b) override Explanation: Overriding is a feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its super-classes or parent classes. You only change what you need to change in order to create specialized objects. Page: 15
  • 16. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 8 Which of the following is a fundamental feature of object- oriented programming language? a) automatic garbage collection b) creating objects and manipulating objects c) platform independence d) all of the above Page: 16
  • 17. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 8 (Solution) Ans: b) creating objects and manipulating objects Explanation: Object-oriented programming is centered on creating objects, manipulating objects, and making objects work together. This allows you to create modular programs and reusable code. It is the fundamental feature of Object-oriented programming languages. Automatic garbage collection and platform independence are features specific to java(not present in all OOP language, such as C++). Page: 17
  • 18. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 9 Which of the following gives platform independence to java programs? a) Bytecode b) JVM c) Both (a) and (b) d) None of these Page: 18
  • 19. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 9 (Solution) Ans: c) Both (a) and (b) Explanation: JVM is needed in order to run Java programs. The programs are compiled into Java Virtual Machine code called bytecode. The bytecode is machine independent and is able to run on any machine that has a Java Virtual Machine. With Java, the program need only be compiled once, and the bytecode generated by the Java compiler can run on any platform. Page: 19
  • 20. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 10 ______________ is the capability for a program to perform several tasks simultaneously within a program. Fill in the blank. a) Polymorphism b) Multithreading c) Exception Handling d) Platform Independence Page: 20
  • 21. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 10 (Solution) Ans: b) Multithreading Explanation: Multithreading is the capability for a program to perform several tasks simultaneously within a program. In Java, multithreaded programming has been smoothly integrated into it, while in other languages, operating system-specific procedures have to be called in order to enable multithreading. Multithreading is a necessity in visual and network - programming. Page: 21
  • 22. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 11 Consider the following 2 statements(S1 and S2). (S1) byte data type is a 8-bit signed two's complement integer. (S2) Default value is 0. Which of the following is correct. a) S1 is TRUE and S2 is FALSE b) S1 is FALSE and S2 is TRUE c) Both S1 and S2 are TRUE d) Both S1 and S2 are FALSE Page: 22
  • 23. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 11 (Solution) Ans: c) Both S1 and S2 are TRUE Explanation: byte data type is a 8-bit signed two's complement integer. Minimum value is -128 (-2^7) Maximum value is 127 (inclusive)(2^7 -1) Default value is 0 Page: 23
  • 24. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 12 byte data type in java is used to save space in large arrays, mainly in place of integers, since a byte is ______ times smaller than an int. Fill in the blank. a) two b) three c) four d) eight Page: 24
  • 25. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 12 (Solution) Ans: c) four Explanation: Byte data type is used to save space in large arrays, mainly in place of integers, since a byte is four times smaller than an int. Int data type is a 32-bit signed two's complement integer in java. Page: 25
  • 26. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 13 Consider the following 2 statements(S1 and S2). (S1) short data type is a 16-bit signed two's complement integer. (S2) Default value is 1. Which of the following is correct. a) S1 is TRUE and S2 is FALSE b) S1 is FALSE and S2 is TRUE c) Both S1 and S2 are TRUE d) Both S1 and S2 are FALSE Page: 26
  • 27. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 13 (Solution) Ans: a) S1 is TRUE and S2 is FALSE Explanation: Short data type is a 16-bit signed two's complement integer. Minimum value is -32,768 (-2^15) Maximum value is 32,767(inclusive) (2^15 -1) Default value is 0. Example : short s= 10000 , short r = -20000 Page: 27
  • 28. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 14 Short data type can also be used to save memory as byte data type. A short is ____ times smaller than an int. Fill in the blank. a) 2 b) 3 c) 4 d) 8 Page: 28
  • 29. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 14 (Solution) Ans: a) 2 Explanation: Short data type can also be used to save memory as byte data type. A short is 2 times smaller than an int. int is of 32 bit whereas short is of 16 bit. Page: 29
  • 30. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 15 Long data type is a ________ signed two's complement integer. Fill in the blank. a) 8 bit b) 16 bit c) 32 bit d) 64 bit Page: 30
  • 31. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 15 (Solution) Ans: d) 64 bit Explanation: Long data type is a 64-bit signed two's complement integer. This type is used when a wider range than int is needed. Page: 31
  • 32. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 16 Consider the following 2 statements(S1 and S2). (S1) int data type is a 32-bit signed two's complement integer. (S2) Default value is 1. Which of the following is correct. a) S1 is TRUE and S2 is FALSE b) S1 is FALSE and S2 is TRUE c) Both S1 and S2 are TRUE d) Both S1 and S2 are FALSE Page: 32
  • 33. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 16 (Solution) Ans: a) S1 is TRUE and S2 is FALSE Explanation: Int data type is a 32-bit signed two's complement integer. Int is generally used as the default data type for integral values unless there is a concern about memory. The default value is 0. Example : int a = 100000, int b = -200000 Page: 33
  • 34. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 17 Which among the following data types in JAVA has the largest memory size? a) int b) short c) byte d) long Page: 34
  • 35. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 17 (Solution) Ans: d) long Explanation: Long data type is a 64-bit signed two's complement integer. This type is used when a wider range than int is needed. Short is 16 bit in size. Byte 8 bit and int is 32 bit in size. Page: 35
  • 36. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 18 Consider the following 2 statements(S1 and S2). (S1) float data type is a single- precision 32-bit floating point. (S2) double data type is a double- precision 64-bit floating point. Which of the following is correct. a) S1 is TRUE and S2 is FALSE b) S1 is FALSE and S2 is TRUE c) Both S1 and S2 are TRUE d) Both S1 and S2 are FALSE Page: 36
  • 37. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 18 (Solution) Ans: c) Both S1 and S2 are TRUE Explanation: Float data type is a single-precision 32-bit floating point. Float is mainly used to save memory in large arrays of floating point numbers. Default value is 0.0f. Example : float f1 = 234.5f double data type is a double-precision 64- bit floating point. This data type is generally used as the default data type for decimal values. generally the default choice. Default value is 0.0d. Example : double d1 = 123.4 Page: 37
  • 38. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 19 Consider the following 2 statements(S1 and S2). (S1) boolean data type represents one bit of information (S2) There are only two possible values of boolean data type : true and false. Which of the following is correct. a) S1 is TRUE and S2 is FALSE b) S1 is FALSE and S2 is TRUE c) Both S1 and S2 are TRUE d) Both S1 and S2 are FALSE Page: 38
  • 39. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 19 (Solution) Ans: c) Both S1 and S2 are TRUE Explanation: boolean data type represents one bit of information. There are only two possible values : true and false. This data type is used for simple flags that track true/false conditions. Default value is false. Example : boolean one = true Page: 39
  • 40. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 20 char data type in java is a single __________ Unicode character. Fill in the blank. a) 8-bit b) 16-bit c) 32-bit d) 64-bit Page: 40
  • 41. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 20 (Solution) Ans: b) 16-bit Explanation: char data type is a single 16-bit Unicode character. Minimum value is 'u0000' (or 0). Maximum value is 'uffff' (or 65,535 inclusive). Char data type is used to store any character. Example . char letterA ='A'. Unicode is a 16-bit character encoding standard and is capable to represent almost every character of well-known languages of the world. Before Unicode, there were multiple standards to represent character encoding − ASCII - for the United States. Page: 41
  • 42. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 21 What is the default value of boolean data type in Java? a) 1 b) 0 c) true d) false Page: 42
  • 43. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 21 (Solution) Ans: d) false Explanation: boolean data type represents one bit of information. There are only two possible values : true and false. This data type is used for simple flags that track true/false conditions. Default value is false. Page: 43
  • 44. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 22 What is the default value of a reference variable in java? a) Garbage Value b) Null Value c) Zero d) One Page: 44
  • 45. MCQs Bank on Object Oriented Programming Topic: Basic OOP concepts MCQ No: 22 (Solution) Ans: b) Null Value Explanation: Reference variable is used to point object/values. Classes, interfaces, arrays, enumerations, and, annotations are reference types in Java. In simple words, a reference variable holds a reference to information related to that variable. A reference is an address that indicates where an object's variables and methods are stored. Default value of any reference variable is null. Page: 45