Search Placementyogi.com
 

Core Java Multiple Choice Questions and Answers

  :: Topics ::

11

JVM is platform independent

A. True
B. False
See Answer & Explanation Lets Discuss
Correct answer is : B
Explanation

Do not make this Mistake Ever!!!!!

JVM is NOT platform independent.

The most popular JVM is called HotSpot by Oracle which is written in C++ and thus, is Platform Dependent. Different JVMs are needed for different environments like Windows specific JVM, Unix Specific JVM etc.

 
12

JAR stands for?

A.

Java Archive

B.

Java Archive Runner

C.

Java Application Runner

D.

None of the above

See Answer & Explanation Lets Discuss
Correct answer is : A
Explanation

JAR (Java Archive) is an archive file which are used to group together java class files, metadata, and other resources like images which are used in the application into one compact file that can be used to distribute the application.

Ref: http://en.wikipedia.org/wiki/JAR_(file_format)

 
13

Is the following way of commenting correct in Java?

/*My Comment 1

       /*My Comment 2*/

*/

A. True
B. False
See Answer & Explanation Lets Discuss
Correct answer is : B
Explanation

No! Nesting of Multi-line comments is not allowed in java

 
14

What are the pillars of OOPS concept?

A.

Abstraction,Inheritance, Encapsulation, Polymorphism

B.

Atomicity, Inheritance, Encapsulation, Polymorphism

C.

Abstraction, Inheritance, Polymorphism

D.

None of the Above

See Answer & Explanation Lets Discuss
Correct answer is : A
Explanation

Abstraction: Hiding unnecessary details from the user.

Inheritance: Maintaining a hierarchy and reuse of code.

Encapsulation: Protecting the data of a class , by providing access only through methods.

Polymorphism: Using same name for performing different functions, ex: Function overloading.

 
15

___________ is a name given to a variable, class or method

A.

Constant

B.

Reference

C.

Identifier

D.

Modifier

See Answer & Explanation Lets Discuss
Correct answer is : C
Explanation

An identifier is a name given to a variable, class or method. It uniquely identifies a memory space inside a java code block.

 
 


Hide Page Information