Question 1
Consider the Java code below.
Choose the correct option.
The output is:

generates compilation error because a variable of type cannot refer to an object of type .
The output is:

The output is:

Consider the Java code below.
Choose the correct option.
The output is:

generates compilation error because a variable of type cannot refer to an object of type .
The output is:

The output is:

Consider the following Java code.
Choose the correct option.
The program generates the output:

The program generates the output:

The program generates the output:

The program generates the output:

Consider the Java code given below.
Identify the appropriate option to fill in place of such that the output is:




Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.
The IIT Madras BS Programming Concepts using Java (Java) Quiz 2 paper sat on 16 Aug 2026, in the May 2026 term, set 1: 15 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.
| Feature | Java Quiz 2 16 Aug 2026 Set 1 at a glance |
|---|---|
| Term | May 2026 term |
| Subject | Programming Concepts using Java |
| Course code | BSCS2005 |
| Questions | 15 |
| Marks | 50 |
| Duration | 120 min |
| MCQ | 13 |
| MSQ | 2 |
| Official paper | Programming Concepts Indian Institute Of Technology, Madras - Bs In Data Science And Applications Using Java 16 Jul 26 |
| Negative marking | No negative marking. |
| Updated |