Вы находитесь на странице: 1из 10

[1] OOP treats what as a critical element in program development and does not a

llow it to flow freely around the system.


Choice a
Procedures

Choice b
Action

Choice c
Data

Choice d
Method

[2] In OOP program objects communicate with each other through

Choice a
Data

Choice b
Methods

Choice c
Classes

Choice d
Objects


[3] Which of the following is TRUE with respect to Dynamic Binding
Choice a
Linking of a procedure call to the code to be executed in response to the call
Choice b
Code associated with a given procedure is not know until time of the call at ru
n time
Choice c
It is associated with inheritance and polymorphism
Choice d
All of the options 1,2,3


[4] In OOP the concept of representing essential features without including the
background details is called as
Choice a
Data Hiding

Choice b
Data Abstraction

Choice c
Inheritance

Choice d
Dynamic Binding


[5] Which of the following is NOT one of the programming techniques.
Choice a
Structured programming

Choice b
Modular programming

Choice c
Bottom-up programming

Choice d
Destructred programming


[6] Dynamic binding is associated with

Choice a
Polymorphism

Choice b
Inheritance

Choice c
Both Option1 and Option2

Choice d
Neither Option1 and Option2


[7] In OOP, the concept of insulating data and from direct access by the progra
m is known as
Choice a
Data hiding

Choice b
Inheritance

Choice c
Polymorphism

Choice d
Abstraction


[8] In OOP, the concept of Polymorphism is

Choice a
Reusability

Choice b
Ability to take more than one form

Choice c
Sharing of data

Choice d
Hiding of data


[9] In OOP, the concept of wrapping data and methods into a single unit called
classes is known as
Choice a
Data Abstraction

Choice b
Inheritance

Choice c
Polymorphism

Choice d
Encapsulation



[10] What does message passing involve in OOP

Choice a
It involves specifying name of the object

Choice b
It involves name of the method

Choice c
It involves the information to be sent

Choice d
All of the options 1,2,3


[11] Which of the following is NOT True with respect to OOP
Choice a
Upgrading systems is difficult

Choice b
Multiple objects co-exists without any interference
Choice c
Secure Programs can be built

Choice d
Software development is made easy


[12] In OOP, the concept of Inheritance provides us with
Choice a
Insulation

Choice b
Linking

Choice c
Reusability

Choice d
Sharing


[13] What are user define data types and behave like built-in types of a progra
mming language.

Choice a
Objects

Choice b
Methods

Choice c
Templates

Choice d
Classes


14] In OOP approach programs are divided into

Choice a
Objects

Choice b
Methods

Choice c
Functions

Choice d
Procedures


[15] In OOP process by which objects of one class acquire the properties of obj
ects of another class is
Choice a
Inheritance

Choice b
Polymorphism

Choice c
Encapsulation

Choice d
Abstraction



[17] Which of the following type of applications OOP can be useful for
Choice a
Real-time Systems

Choice b
Simulation and modelling

Choice c
Decision Support and office automation systems
Choice d
All of the options 1,2,3



[18] Java is Multithreaded Language, What Statement best explains this feature
Choice a
Java application need not wait for the application to finish one task before be
ginning another
Choice b
Java is capable of dynamically linking in U class libraries, methods and object
s
Choice c
Java supports functions written in other languages such as C and C++
Choice d
Java uses less amount of memory in environment

[19] Which of the following C++ feature is NOT included in Java
Choice a
Multilevel inheritance

Choice b
Inner classes

Choice c
Multithreading

Choice d
Operator overloading



[20] Java is Extensible Language, What Statement best explains this feature
Choice a
Java application need not wait for the application to finish one task before be
ginning another
Choice b
Java is capable of dynamically linking in U class libraries, methods and object
s
Choice c
Java supports functions written in other languages such as C and C++
Choice d
Java uses less amount of memory in environment


[21] What is the function of Java Disassembler

Choice a
Machine code can be converted into compiled code
Choice b
Compiled code can be converted into machine code
Choice c
Source code can be converted into compiled code
Choice d
Compiled code can be converted into source code


[22] JDK stands for

Choice a
Java Display Kit

Choice b
Java Direct Kit

Choice c
Java Debugger Kit

Choice d
Java Development Kit



[22] JDK stands for

Choice a
Java Display Kit

Choice b
Java Direct Kit

Choice c
Java Debugger Kit

Choice d
Java Development Kit


[24] Identify line numbers where errors occur in the following code
1 Class sample
2 {
3 public static void main(string args[])
4 {
5 int m=10;
6 {
7 int m=20;
8 }
9 }
10 }
Choice a
**** Lines 1,3,7
Choice b
Line 3,5,7
Choice c
Line 5,7
Choice d
Line 3,5

[25] Identify line numbers where compile errors occur in the following code
1 class sample
2 {
3 public static void display()
4 {
5 byte x=212;
6 float f=100.12;
7 System.out.println("Value of f="+f);
8 System.out.println("Value of x="+x);
9 }
10 }
Choice a
Lines 5,6,7,8
Choice b
**** Line 5,6
Choice c
Line 7,8
Choice d
Line 5,6

[25] Identify line numbers where compile errors occur in the following code
1 class sample
2 {
3 public static void display()
4 {
5 byte x=212;
6 float f=100.12;
7 System.out.println("Value of f="+f);
8 System.out.println("Value of x="+x);
9 }
10 }
Choice a
Lines 5,6,7,8
Choice b
Line 5,6
Choice c
Line 7,8
Choice d
Line 5,6

[25] Identify line numbers where compile errors occur in the following code
1 class sample
2 {
3 public static void display()
4 {
5 byte x=212;
6 float f=100.12;
7 System.out.println("Value of f="+f);
8 System.out.println("Value of x="+x);
9 }
10 }
Choice a
Lines 5,6,7,8
Choice b
Line 5,6
Choice c
Line 7,8
Choice d
Line 5,6

[25] Identify line numbers where compile errors occur in the following code
1 class sample
2 {
3 public static void display()
4 {
5 byte x=212;
6 float f=100.12;
7 System.out.println("Value of f="+f);
8 System.out.println("Value of x="+x);
9 }
10 }
Choice a
Lines 5,6,7,8
Choice b
Line 5,6
Choice c
Line 7,8
Choice d
Line 5,6

[25] Identify line numbers where compile errors occur in the following code
1 class sample
2 {
3 public static void display()
4 {
5 byte x=212;
6 float f=100.12;
7 System.out.println("Value of f="+f);
8 System.out.println("Value of x="+x);
9 }
10 }
Choice a
Lines 5,6,7,8
Choice b
Line 5,6
Choice c
Line 7,8
Choice d
Line 5,6

[26] What is the output of the following program code
class check
{
public static void main(String args[])
{
boolean b=true;
System.out.println("False");
if(!b) return;
System.out.println("True");
return;
}
}
Choice a
True
Choice b
False
Choice c
***** False True
Choice d
Error

[26] What is the output of the following program code
class check
{
public static void main(String args[])
{
boolean b=true;
System.out.println("False");
if(!b) return;
System.out.println("True");
return;
}
}
Choice a
True
Choice b
False
Choice c
False True
Choice d
Error

[26] What is the output of the following program code
class check
{
public static void main(String args[])
{
boolean b=true;
System.out.println("False");
if(!b) return;
System.out.println("True");
return;
}
}
Choice a
True
Choice b
False
Choice c
False True
Choice d
Error

[27] What will be the output of the following program code
class sample
{
public static void main(String args[])
{
int x=10;
int y=15;
System.out.print(x>y?4:3);
}
}
Choice a
**** 3
Choice b
4
Choice c
10
Choice d
15


[28] 4. What will be the output of the following code segment
int m = 100;
int n =103;
while(++m<=--n);
{
System.out.print(m);
}
Choice a
***** 102
Choice b
101
Choice c
103
Choice d
100


[29] What will be the output of the following code, if executed with command li
ne arguments as follows
java cmdline Java is wonderful
class cmdline
{
public static void main(String args[])
{
for(int i=1;i<args.length;i++)
{
System.out.print(args[i]);
if(i!=args.length)
System.out.print( );
}
System.out.println();
}
}
Choice a
Java
Choice b
Java is
Choice c
is wonderful
Choice d
cmdline Java is wonderful
30] What will be the output of the following code, if executed with command lin
e arguments as follows
java cmdline Java is wonderful
class cmdline
{
public static void main(String args[])
{
System.out.println(Number of arguments : +args.length);
for(int i=0;i<args.length;i++)
System.out.print(args[i]+ );
}
}
Choice a
Number of arguments : 4
Java is wonderful
Choice b
4
cmdline Java is wonderful
Choice c
Number of arguments : 3
Java is wonderful
Choice d
cmdline Java is wonderful

Вам также может понравиться