Important Java Mcq 1

What is the difference between the file MyProgram.java and the file MyProgram.class?

a. MyProgram.java is a compiled executable class file that is run by the computer, and MyProgram.class is a source code file typed by the programmer

b. MyProgram.class is a compiled executable class file that is run by the computer

c. MyProgram.java is a source code file typed by the programmer

d. MyProgram.java is a source code file typed by the programmer, and MyProgram.class is a compiled executable class file that is run by the computer.

Answer:

d. MyProgram.java is a source code file typed by the programmer, and MyProgram.class is a compiled executable class file that is run by the computer.

Explanation:

Programmers create files with extension .java which are compiled into files with .class extension which are then executed by the system.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?