Page 86 - computer science (868) class 11
P. 86
8. Java follows the principle of ………………… .
a. “Write Once, Run Once” b. “Write Once, Run Anywhere”
c. “Write Once, Run Anytime” d. “Write Twice, Run Anywhere”
9. Java programs that execute in the client side are known as ………………… .
a. Applets b. Stand-alone applications
c. Both a and b d. None of these
10. Which of the following is the feature of being able to allot a dissimilar meaning so that a variable, a method or an object can have
more than one form?
a. Data abstraction b. Polymorphism
c. Inheritance d. Data hiding
Answers
1. b 2. b 3. b 4. d 5. a 6. c 7. d 8. b 9. a 10. b
B. Fill in the blanks:
1. If there is some error that will execute the program but the desired output will not be achieved, then it is called a …………………
error.
2. Missing semicolon (;) is a ………………… error.
3. ………………… is also known as machine code and is directly understood by the computer.
4. During execution of a program, the occurrence of any error stops the execution. This situation is known as ………………… .
5. The two classifications of Java stand-alone applications are console-based applications and ………………… .
6. ………………… means combining the code and data into a single unit.
7. ………………… is a programming language that uses English letters or words and Mathematical symbols like +, -, *, etc. in its
instructions.
8. A ………………… is the class from which features are inherited to another class.
9. COBOL, BASIC, etc. are some examples of ………………… .
10. Java uses both compiler as well as ………………… .
Answers
1. logical 2. syntax 3. Machine language
4. exception 5. graphical user interface-based applications 6. Encapsulation
7. High-level language 8. superclass
9. procedure-oriented languages 10. interpreter
C. Answer the following questions:
1. Name the types of Java programs.
Ans. The types of Java programs are as follows:
1. Standalone Applications
2. Java Applets
2. Define polymorphism.
Ans. In object-oriented programming, polymorphism is the feature of being able to allot a dissimilar meaning so that a variable, a
method or an object can have more than one form.
3. Define data abstraction.
Ans. Data abstraction is the property by which the essential features are represented without knowing the background details that
how it is actually executing, i.e., non-essential units are hidden from the user.
4. Distinguish between superclass and subclass.
Ans.
Superclass Subclass
A class whose characteristics are inherited by another class. A class which inherits the features of another class.
Superclass is also known as base class or parent class. Subclass is also called derived class or extended class or child
class.
8484 Touchpad Computer Science-XI

