ICSE Class 9 Computer Applications Question 7 of 30

Introduction to Java — Question 7

Back to all questions
7
Question

Question 7

Distinguish between the following:

a. Source code and Object code

Answer
Source CodeObject Code
It is a set of instructions written in a high-level programming language.It is the compiler generated machine language version of the source code.
It can be read and understood by humans.It is not human readable but is understood by machines.

b. Compiler and Interpreter

CompilerInterpreter
It converts the whole source program into the object program at once.It converts the source program into the object program, one line at a time.
It displays the errors for the whole program together, after the compilation.It displays the error one line at a time and only after fixing that error the control goes to the next line.

c. ".java" file and ".class" file

".java" file".class" file
It contains the Java source code of the program.It contains the Bytecode of the program.
It is written by human (programmer)It is generated by Java compiler.