0% found this document useful (0 votes)
5K views

DIT MCQ's

1. This document contains a 10 question multiple choice quiz on Java concepts. The questions cover topics like output of code, data types, inheritance, exceptions, I/O streams, method overloading, the 'this' keyword, and polymorphism. 2. Students are given 10 minutes to complete the quiz and select the best answer from the multiple choice options provided for each question. 3. The quiz is assessing understanding of fundamental Java concepts through short questions with clear right and wrong answers.

Uploaded by

Nouman M Durrani
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5K views

DIT MCQ's

1. This document contains a 10 question multiple choice quiz on Java concepts. The questions cover topics like output of code, data types, inheritance, exceptions, I/O streams, method overloading, the 'this' keyword, and polymorphism. 2. Students are given 10 minutes to complete the quiz and select the best answer from the multiple choice options provided for each question. 3. The quiz is assessing understanding of fundamental Java concepts through short questions with clear right and wrong answers.

Uploaded by

Nouman M Durrani
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

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.

You might also like