Ls -3 Introduction to Java Language
Worksheet 2
Question 1
Choose the correct answer and write the correct option:
1) How is encapsulation implemented in a program?
a) using a class
b) using only functions
c) using only variables
d) none of these
2) The full form of JRE is
a) Java Runtime Editor
b) Java Runtime Environment
c) Java Runtime Expression
d) Java Runtime Enabler
3) A set of instructions written in high level programming
language is called
a) byte code
b) source code
c) object code
d) all of these
4) Which of the following OOP concept binds the code and data
together?
a) Abstraction
b) Encapsulation
c) Modularity
d) Inheritance
5) Java was initially called as
a) Oak
b) OOP
c) Tree
d) Bean
6) Following is not a part of OOP concept:
a) Encapsulation
b) Inheritance
c) Recursion
d) Abstraction
7) What is byte code in Java?
a) Code generated by a Java compiler
b) Code generated by a Java Virtual Machine
c) Name of Java source code file
d) Block of code written inside a class
8) Who invented Java Programming?
a) Guido van Rossum
b) James Gosling
c) Dennis Ritchie
d) Bjarne Stroustrup
9) What is the extension of java code files?
a) .js
b) .txt
c) .class
d) .java
10) What is the extension of compiled java classes?
a) .txt
b) .js
c) .class
d) .java