PG4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

7/13/2020 Introduction to Object Oriented Programming Concepts | Happy Compiler

electronics. But its platform independence feature made it popular as a general purpose
programming language.
3. Mention at least four features of Java.
a) It is an object oriented programming language.
b) It uses both compiler and interpreter.
c) It is case-sensitive.
d) It is a platform independent programming language.
4. Define the following:
a) A compiler: Program that converts high-level language program into low-level language
program at once.
b) An interpreter: Program that converts high-level language program into low-level
language program line by line.
c) Bytecode: Intermediate code that is generated after a Java source code is compiled. It is
platform independent, and only needs JVM for execution.
5. What is Java Virtual Machine (JVM)?
JVM is the interpreter that is responsible for executing the bytecode. It acts as a virtual
processor for Java, making it platform independent because the program directly doesn’t
depend on the physical processor.
6. Name three packages of Java class library.
java.io, java.lang, java.util.
7. What are Java reserved words? Name any five.
Reserved words are the keywords that have a special meaning in a program. It cannot be
used as an identifier. Examples include class, public, static, void, return.
8. Distinguish between:
a) source code and object code: Source code is the program written in a high-level
language. Object code is the program that is in low-level language, generated after compiling
the source code.
b) compiler and interpreter: Compiler is a program that converts high-level language
program into low-level language program at once. Interpreter is a program that converts
high-level language program into low-level language program line by line.
c) JDK 1.3 and BlueJ: JDK 1.3 is the toolkit that includes the compiler, interpreter and other
libraries needed to compile and run Java programs. BlueJ is an IDE that helps us in writing,
compiling and executing Java programs all in one place.
9. A compiler is specific to a language. Give your comments.
A compiler converts high-level language program into low-level language program. This low-
level language program consists of machine language which is specific to a given platform. It
is machine dependent. This is why a compiler is specific to a language.
10. What is the basic format of a Java program? Explain with an example.
The basic format is to enclose the code within a class. Inside a class, we provide data
members, and methods that work on those data members.
11. What is BlueJ?
BlueJ is an IDE that helps us in writing, compiling and executing Java programs all in one
place.
12. Mention five features of BlueJ.
a) It is a window-based program, making it suitable to use.
b) It has facilities for easier debugging.

https://www.happycompiler.com/oop/ 4/12

You might also like