MauryaHub PYQ Practice

Programming Concepts using Java · End Term · Jan 2026 · AN

Programming Concepts using Java · End Term · Jan 2026 AN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 23 published solutions

Question 2 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
What will the output be?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MSQ · 4.0 marks

From among the options, identify the appropriate function header(s) for function
Source diagram or notation
that takes as input an array of
Source diagram or notation
objects and prints the highest marks among them.
Source diagram or notation
Choose the correct option(s).
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
What will the output be?
A.
This program generates the output:
Source diagram or notation
B.
This program generates the output:
Source diagram or notation
C.
This program generates the output:
Source diagram or notation
D.
This program generates the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Source diagram or notation
Identify the appropriate statement to fill in the blank at
Source diagram or notation
, such that the output is:
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 4.0 marks

Consider the following block of code.
Source diagram or notation
Which among the following code blocks can replace the given code in order to generate a customized assertion error as shown below?
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Choose the correct option.
A.
It generates the output:
Source diagram or notation
B.
Compilation fails because
Source diagram or notation
and
Source diagram or notation
cannot be converted to
Source diagram or notation
C.
Compilation fails because
Source diagram or notation
method has not been defined in classes
Source diagram or notation
and
Source diagram or notation
D.
It generates the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Choose the correct option to fill in place of
Source diagram or notation
so that the output is:
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Choose the correct option.
A.
This program generates the output:
Source diagram or notation
B.
This program generates the output:
Source diagram or notation
C.
This program generates the output:
Source diagram or notation
D.
This program generates the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 6.0 marks

Consider the Java code given below.
Source diagram or notation
Which of the following is NOT true about the given code?
A.
This program may generate
Source diagram or notation
.
B.
The program may generate the output:
Source diagram or notation
C.
The program may generate the output:
Source diagram or notation
D.
The program may generate the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Choose the correct option to fill in the blank at
Source diagram or notation
such that the program generates the following output.
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.
All of these.

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Choose the correct option.
A.
This program generates the output:
Source diagram or notation
B.
This program generates the output:
Source diagram or notation
C.
This program generates the output:
Source diagram or notation
D.
This program terminates abnormally due to unhandled exception(s).

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
Choose the correct option.
A.
It generates the output:
Source diagram or notation
B.
It generates the output:
Source diagram or notation
C.
It generates the output:
Source diagram or notation
D.
It generates the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 4.0 marks

Consider the code given below. Assume that the file
Source diagram or notation
contains the following lines of text in it.
Source diagram or notation
Source diagram or notation
Choose the correct option.
A.Source diagram or notation
throws an
Source diagram or notation
B.
This program generates the output:
Source diagram or notation
C.
This program generates the output:
Source diagram or notation
D.
This program generates the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MCQ · 5.0 marks

Consider the code given below.
Source diagram or notation
What will the output be?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 6.0 marks

Consider the following code which has 4 user-defined threads, two threads would work as data adders to a dataset (object) and the other two work as data removers from the same dataset.
Source diagram or notation
Source diagram or notation
Choose all the options that would NEVER occur as a result of execution of this code.
A.
It may generate the output as:
Source diagram or notation
B.
It may generate the output as:
Source diagram or notation
C.
It may generate the output as:
Source diagram or notation
D.
It may generate the output as:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MCQ · 4.0 marks

Consider the code given below that checks whether two circles are identical. Method
Source diagram or notation
is overridden to compare two
Source diagram or notation
objects as follows. If two circles have the same radius and center, then both are considered identical. Based on the given information, answer the question that follows.
Source diagram or notation
Choose the correct option to fill in place of
Source diagram or notation
so that the output is:
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MCQ · 4.0 marks

Consider the following Java code that uses chained exceptions.
Source diagram or notation
What can be the output of this code?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MCQ · 4.0 marks

Method
Source diagram or notation
returns an infinite sequential ordered
Source diagram or notation
produced by iterative application of a function
Source diagram or notation
to an initial element
Source diagram or notation
, producing a
Source diagram or notation
consisting of
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
, etc. Based on the above information, consider the code given below, and answer the question that follows.
Source diagram or notation
What will the output be?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MCQ · 4.0 marks

Consider the code given below.
Source diagram or notation
Choose the correct option.
A.
The code always prints 2000.
B.
The code prints any number in the range 1000 to 2000
C.
The code prints any number in the range 0 to 1000
D.
The code always prints 1000.

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
What will the output be?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MCQ · 4.0 marks

Consider the Java code given below.
Source diagram or notation
What will the output be?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 MCQ · 5.0 marks

Method
Source diagram or notation
returns an
Source diagram or notation
that describes the specific value, if non-null; otherwise returns an
Source diagram or notation
. Based on this description, consider the code given below, and answer the question that follows.
Source diagram or notation
Choose the correct option.
A.
This program generates the output:
Source diagram or notation
B.
This program terminates due to
Source diagram or notation
after printing the message:
Source diagram or notation
C.
This program generates the output:
Source diagram or notation
D.
This program generates the output:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 MCQ · 6.0 marks

Consider the Java code given below.
Source diagram or notation
Source diagram or notation
Choose the correct option to be filled in place of
Source diagram or notation
such that the above program produces the GUI with rows input at the top, columns input in the center, and the button at the bottom.
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q24