Quiz Space

Programming Concepts using Java · Quiz 2 · 16 Aug 2026 · May 2026 term · Set 2

Java Quiz 2 16 Aug 2026 — Question 11

Question 11

+4 marksOne correct option

Consider the code given below.

Choose the correct option.

Consider the code given below.
  1. A

    generates compilation error because a variable of type cannot refer to an object of type .

  2. B

    This code generates the below output followed by runtime error at because there is ambiguity in which method is being invoked.

    This code generates the below output followed by runtime error at  because there is ambiguity in which  method is being
  3. C

    This code generates the output:

    This code generates the output:
  4. D

    This code generates the output:

    This code generates the output:
Show answer

Correct answer

  • D

    This code generates the output:

    This code generates the output:

Question 11 of 15 in the IIT Madras BS Programming Concepts using Java (Java) Quiz 2 paper sat on 16 Aug 2026, in the May 2026 term (Programming Concepts Indian Institute Of Technology, Madras - Bs In Data Science And Applications Using Java 16 Jul 26). It carries 4 marks.

More questions from this paper

  1. Q1Which of the following statement(s) is/are true regarding activation records used during function calls?
  2. Q2Consider the Java code given below. Choose the correct option to fill in the so that the output is:
  3. Q3Consider the Java code given below. Which of the following statements is FALSE?
  4. Q4Consider the Java code given below. Choose the correct option.
  5. Q5Consider the Java code given below. Choose the correct option regarding the output produced by the code.
  6. Q6What is the output of the following code?
  7. Q7Consider the Java program below. Choose the correct option regarding the output of the code.
  8. Q8Consider the following Java code. Identify the correct option for the code given above.
  9. Q9Consider the following Java code. What will the output be?
  10. Q10Consider the Java code given below. Choose the correct option.
  11. Q12Consider the code given below that checks whether two software modules are the same. Method is overridden to compare tw…
  12. Q13Consider the code given below. Identify the appropriate statement to fill in the blank at , such that the output is:
  13. Q14Consider the Java code given below. Identify the appropriate option to fill in the blank at line:1 such that output of …
  14. Q15Consider the Java program below. Identify the correct option(s) to fill in the blank at , such that the output is: