Search Placementyogi.com
 

Core Java Objective Questions and Answers for placement

  :: Topics ::

6

Java source codes are compiled and converted to

A.

Objectcodes

B.

Assemblycodes

C.

Binarycodes

D.

Bytecodes

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

Bytecode is a highly optimized set of instructions which are used in Java to implement PORTABILITY. This bytecode is common for all platforms like Unix, Windows, Mac etc. and is interpreted by the JVM to run the program.

 
7

What is the Extension of java bytecodes?

A.

.java

B.

.class

C.

.bc

D.

None of the Above

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

The extension of java bytecodes is ".class".

A .java file is converted into .class file using javac command.

This .class file is used by JVM to run the program on different platforms.

 
8

What is the command to compile a java program? (Let the file name be myprogram.java)

A.

java myprogram.java

B.

javac myprogram.java

C.

java myprogram

D.

javac myprogram

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

The correct way to compile a java program is :

javac myprogram.java

Javac means javaCompiler and generates compiled java code called java bytecodes.

 
9

What is the command to execute a java program? (Let the file name be myprogram.java)

A.

java myprogram.java

B.

javac myprogram

C.

java myprogram.class

D.

java myprogram

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

The correct command to execute a java program is

java myprogram

Note: The extension .class of the bytecode is omitted while execution

 
10

Garbage collection takes place automatically in JVM.

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

A memory becomes available for Garbage Collection as soon as last reference to it is lost.

We can not forcefully run Garbage Collector (GC) in Java. Though you can request for garbage collection using the System.gc() command, but it does not ensure that the GC will run.

 
 

Banner to LogicGuns.com

Hide Page Information

Core Java Objective Questions and Answers for Written Round Interview

Here you can find Core Java Objective Questions with answers and explanation. We have a vast collection of Objective Questions on Java in Core that will help you a lot!

Why learn Core Java?

Core Java are an integral part of Java and many Objective Questions in the written round are asked from this topic.In this section you can learn and practice Core Java (Objective Questions with Answers) to improve your skills in order to face the interview and clear campus and off-campus selection of TCS, Infosys, Wipro etc.

Where can I get Core Java Objective Questions and Answers with Explanation?

PlacementYogi provides you lots of fully solved Core Java Objective Questions and answers with explanation. Fully solved examples with detailed answer description, explanation are given and it would be easy to understand.Though we do not have pdf file for Core Java, We have quiz Objective Questions with answers to help you test yourself..

\n

Where can I get Core Java Interview Objective Questions and Answers (objective type, multiple choice)?

Here you can find objective type Core Java Objective Questions and answers for interview and entrance examination.Multiple Answers and true or false type Objective Questions are also provided.

How to solve Core Java problems?

You can easily solve all kind of Objective Questions based on Core Java by practicing the exercises (including shortcut Java to solve problems) given below.