You are on page 1of 15

[1] What are user define data types and behave like built-in types of a programming language.

Objects Methods Templates Classes

[2] In OOP, the concept of insulating data and from direct access by the program is known as Data hiding inheritance polymorphism Abstraction

[3] Which of the following is NOT True with respect to OOP

Upgrading systems is difficult Multiple objects co-exists without any interference Secure Programs can be built

Software development is made easy

[4] In OOP the concept of representing essential features without including the background details is called as Data Hiding Data Abstraction Inheritance Dynamic Binding

[5] In OOP approach programs are divided into Objects Methods Functions Procedures

[6] In OOP, the concept of Polymorphism is Reusability Ability to take more than one form Sharing of data

hiding of data

[7] In OOP, the concept of wrapping data and methods into a single unit called classes is known as Data Abstraction Inheritance Polymorphism Encapsulation

[8] In OOP, the concept of Inheritance provides us with Insulation Linking Reusability Sharing

[9] Which of the following is NOT one of the programming techniques. Structured programming Modular programming

Bottom-up programming Destructred programming

[10] Dynamic binding is associated with Polymorphism Inheritance Both Option1 and Option2 Neither Option1 and Option2

[11] OOP treats what as a critical element in program development and does not allow it to flow freely around the system. Procedures Action Data Method

[12] In OOP process by which objects of one class acquire the properties of objects of another class is

Inheritance Polymorphism Encapsulation Abstraction

[13] In OOP program objects communicate with each other through Data Methods Classes Objects

[14] What does message passing involve in OOP It involves specifying name of the object It involves name of the method It involves the information to be sent All of the options 1,2,3

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

[16] In OOP approach programs are divided into Objects Methods Functions Procedures

[17] Which of the following type of applications OOP can be useful for Real-time Systems Simulation and modelling

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

[18] Java is Distributed-language, What statement explain this feature Java programs can be easily moved from one computer system to another Java systems verify memory access and virus Java can be used to create applications on the networks It provides many safeguards to ensure reliable code

[19] Java is also popularly known as Web browser Applet language Internet language Object language

[20] JDK stands for Java Display Kit

Java Direct Kit Java Debugger Kit Java Development Kit

[21] Which of the following is NOT one of the web browsers Coldjava Netscape Navigator Internet Explorer Hotjava

[22] Java is a _________ Language Compiled Interpreted Both Compiled and Interpreted Byte Code

[23] Identify line numbers where errors occur in the following code 1 class sample

2{ 3 public static void main(String[], args[]) 4{ 5 System.out.println(Hello); 6} 7 }; a. Lines 3,7 b. Line 3 c. Line 7 d. Line 5

[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 } a. Lines 1,3,7 b. Line 3,5,7 c. Line 5,7 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 } a. Lines 5,6,7,8 b. Line 5,6 c. Line 7,8 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; if(b) System.out.println("False"); System.out.println("True"); return; } }

a. True b. False c. False True d. Error

[27] What is the value of ans if the code of statements are executed int i = 42+45-48-5; int j = 5+5-8+2; int ans = i%j; a. 2 b. 8 c. 34 d. 12

[28] What is the value of result if the code of statements are executed int result = 42+45-48-5-15+20*2; a. 59 b. 68 c. 146

d. 134

[29] What will be the output of the following code, if executed with command line 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(); } } a. Java

b. Java is c. is wonderful d. cmdline Java is wonderful

[30] What will be the output of the following code, if executed with command line 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++ ); } } a. Number of arguments : 4 Java is wonderful b. 4

cmdline Java is wonderful c. Number of arguments : 3 Java is wonderful d. cmdline Java is wonderful

You might also like