Sie sind auf Seite 1von 10

JAVA ASSESSMENT-1

Sl #

10

11

12

13

14

15

JAVA ASSESSMENT-1
Instructions : All questions are mandatory A question may have multiple correct answers
Which language is pure object oriented? A. SAMLL TALK B. COBOL C.JAVA D.C++ Which is correct regarding the procedural programming approach? A.Portion of the code are so interdependent that they can't be reused in another application. B.Portions of the code can be reused. C. It provides information hiding. D. It provides the real time approach to build a program. Which is/are true related to a CLASS? A. Creating memory for an object B. Behaviour of an object C. Blue print of an object D. It can be reusable Which option(s) is correct about the objects? A.Implementation of a class B.May be Used to access member data/functions C.Is a Theoritical concept D. Having a physical existance. Wrapping of the data and not allowing it to be interfered by outside code. Which is/are true for the above. A.This phenomenon is called Encapsulation B.This phenomenon is called Absraction C.Both A and B are True D.None of the above Which of the following related to Reusability of code ? A. Function B.Class C.Inheritence D.Polymorphism

When declaring the main method, what is the sequence of public or static? A.public must come before static B.static must come before public C.They can be in either order D.None of the above Which of the following is true for Inheritance? A. Used for reusability B. Used for security C. Used for overloading D. None of the above Identify the correct statement? A. Java is platform independent B. Java Vitual Machine(JVM) is platform independent. C. Java is a interpreter based language D. Before execution , java code has to convert to machine code Which is/are not part of JVM? A. Just In Time(JIT) compiler B.Bytecode Verifier C.Byte code D.Loader E. Java File applet can be viewed by A. Applet enabled web browser B. Java enabled web browser C. java appletfilename D. appletviewer What do you mean by "Exception in thread "main" java.lang.NoSuchMethodError: main? Which of the following are true about applet? A. Applets are java programs B.They are running in the client system C.They are independently running in server D.Their execution is only confined to system JRE. Which of the following is true? A. Bytecode makes java language platform independent B. Bytecode makes java language secure C.JVM makes java language platform independent D.Interpreter makes java language platform independent

Explain the difference between overloading and overriding ?

Desc. Answers

Only B & C & D

Only A & B & D

Only A & B & C

Only A & C & D

Only C & E

Only B & D

Main meathod not found, it will throw a error

Only A & B & D

Only B & C

OVERLOADING:1)A type of compile time polymorphism. 2)Also called as early binding. 3)Two types- Operator and function overloading.

11. class Converter { 12. public static void main(String[] args) { 13. Integer i = args[0]; 14. int j = 12; 15. System.out.println(It is + (j= =i) + that j= =i.); 16. } 17. } What is the result when the programmer attempts to compile the code and run it with the command java Converter 12? A. It is true that j= =i. B. It is false that j= =i. C. An exception is thrown at runtime. D. Compilation fails because of an error in line 13.

Das könnte Ihnen auch gefallen