Question 1
Consider the Java code given below.
Immediately after the execution of Line 8, the activation record of which method is at the top of the stack of activation records?

The IIT Madras BS Programming Concepts using Java (Java) End Term paper sat on 13 Sept 2026, in the May 2026 term, set S2: 13 questions for 57 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
Consider the Java code given below.
Immediately after the execution of Line 8, the activation record of which method is at the top of the stack of activation records?
Correct answer
Consider the code given below.
Choose the correct option regarding the code.
The code generates the output:
(A figure from the original paper is missing from the source site.)
Correct answer
The code generates the output:
(A figure from the original paper is missing from the source site.)
Consider the Java code given below.
Choose the correct option.
This program generates output:
(A figure from the original paper is missing from the source site.)
Correct answer
Consider the Java code given below.
What will the output be?
This program generates the output:
(A figure from the original paper is missing from the source site.)
This program generates the output:
(A figure from the original paper is missing from the source site.)
This program generates the output:
(A figure from the original paper is missing from the source site.)
This program generates the output:
(A figure from the original paper is missing from the source site.)
Correct answer
This program generates the output:
(A figure from the original paper is missing from the source site.)
Choose the correct option.
This program generates the output:
(A figure from the original paper is missing from the source site.)
This program generates the output:
(A figure from the original paper is missing from the source site.)
(A figure from the original paper is missing from the source site.)
Correct answer
This program generates the output:
(A figure from the original paper is missing from the source site.)
Consider the Java code given below.
Choose the correct option.
Correct answer
Consider the code given below.
What will the output be?
Correct answer
Choose the correct option.
This program generates the output:
(A figure from the original paper is missing from the source site.)
This program generates the output:
(A figure from the original paper is missing from the source site.)
This program generates the output:
(A figure from the original paper is missing from the source site.)
Correct answer
This program generates the output:
(A figure from the original paper is missing from the source site.)
Consider the Java code given below.
All of these.
Correct answer
If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value. Otherwise, replaces the associated value with the results of the given remapping function, or removes if the result is null. Consider the code given below that uses the merge method to combine scores of players and answer the question that follows.
Choose the correct option regarding the code.
Correct answer
Consider the Java code given below.
Which of the following is NOT true about the given code.
The program may generate the output:
(A figure from the original paper is missing from the source site.)
The program may generate the output:
(A figure from the original paper is missing from the source site.)
The program may generate the output:
(A figure from the original paper is missing from the source site.)
Correct answer
Consider the following Java code and choose the correct option.
This program generates output:
(A figure from the original paper is missing from the source site.)
This program generates output:
(A figure from the original paper is missing from the source site.)
Correct answer
Consider the Java code given below.
Choose the correct option(s).
The program will always generate the output:
(A figure from the original paper is missing from the source site.)
The program will always generate the output:
(A figure from the original paper is missing from the source site.)
The program may not generate any output.
Correct answers
The program may not generate any output.