2
INSTITUTE OF COMPUTER SCIENCE. DIT (JAVA) Time : 10 Min. Multiple choice Questions . 10 Marks. 1. What is the output of following program. If(n==0) System.out.println(n); a) 0. b) 1 c) 2. 2. The following point types are. a) float and double. b) char and float. c) float and integer. 3. Inheritance is. a) the addition numbers establish what makes the derived class object different from the base. b) the addition numbers establish what makes the derived class object some qualities different from the base. c) the addition numbers establish what makes the derived class object same as the base. 4. Exceptions are objects of subclasses of the class. a) Clonable. b) Drawable c) Throwable. 5. The base class for byte stream output operation. a) InputStream. b) OutputStream. c) Reader. 6. The base class for character stream output operations. a) Reader. b) Writer. c) RandomAccessFile. 7. Reads a number of blocks of data from file. a) Package. b) Thread. c) Exception. 8. Java allows you to define several methods in a class with the same name as long

DIT MCQ's

Embed Size (px)

Citation preview

Page 1: DIT MCQ's

INSTITUTE OF COMPUTER SCIENCE.DIT (JAVA)

Time : 10 Min.Multiple choice Questions . 10 Marks.

1. What is the output of following program.

If(n==0)System.out.println(n);

a) 0. b) 1 c) 2.

2. The following point types are.

a) float and double. b) char and float. c) float and integer.

3. Inheritance is.

a) the addition numbers establish what makes the derived class object different from the base.b) the addition numbers establish what makes the derived class object some qualities different from

the base.c) the addition numbers establish what makes the derived class object same as the base.

4. Exceptions are objects of subclasses of the class.

a) Clonable. b) Drawable c) Throwable.

5. The base class for byte stream output operation.

a) InputStream. b) OutputStream. c) Reader.

6. The base class for character stream output operations.

a) Reader. b) Writer. c) RandomAccessFile.

7. Reads a number of blocks of data from file.

a) Package. b) Thread. c) Exception.

8. Java allows you to define several methods in a class with the same name as long as each method has a set of parameters that is unique called.

a) method overloading. b) Variable overloading. C) Constructor overloading.

9. which refers to the current object for which the method is being called.

a) This. b) Super keyword. c) Local variable.

10. Allows us to implement methods of derived class during runtime.

a) Interface. B) Inheritance. C) polymorphism.