0% found this document useful (0 votes)
4 views40 pages

Javaq1 Javaq2 Merged

The document outlines an exam paper for a Diploma Level course in Programming Concepts using Java at the Indian Institute of Technology, Madras. It includes details such as the exam duration, total marks, and various sections with multiple-choice questions related to Java programming. The document specifies the structure of the exam, including mandatory questions and options for each question.

Uploaded by

23f2000902
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views40 pages

Javaq1 Javaq2 Merged

The document outlines an exam paper for a Diploma Level course in Programming Concepts using Java at the Indian Institute of Technology, Madras. It includes details such as the exam duration, total marks, and various sections with multiple-choice questions related to Java programming. The document specifies the structure of the exam, including mandatory questions and options for each question.

Uploaded by

23f2000902
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Indian Institute of Technology, Madras - BS in Data Science and Applications

Notations :
[Link] shown in green color and with icon are correct.
[Link] shown in red color and with icon are incorrect.

IIT M DIPLOMA AN EXAM QDD2 15 Mar


Question Paper Name :
2026
Subject Name : 2026 Mar15: IIT M AN EXAM QDD2
Creation Date : 2026-03-04 18:18:35
Duration : 120
Total Marks : 710
Display Marks: Yes
Share Answer Key With Delivery Engine : Yes
Actual Answer Key : Yes
Calculator : Scientific
Magnifying Glass Required? : No
Ruler Required? : No
Eraser Required? : No
Scratch Pad Required? : No
Rough Sketch/Notepad Required? : No
Protractor Required? : No
Show Watermark on Console? : Yes
Highlighter : No
Auto Save on Console? Yes
Change Font Color : No
Change Background Color : No
Change Theme : No
Help Button : No
Show Reports : No
Show Progress Bar : No

Group I
Group Number : 1
Group Id : 64065332678
Group Maximum Duration : 0
Group Minimum Duration : 90
Show Attended Group? : No
Edit Attended Group? : No
Break time : 0
Group Marks : 710
Is this Group for Examiner? : No
Examiner permission : Cant View
Show Progress Bar? : No
Revisit allowed for group Instructions? : Yes
Maximum Instruction Time : 0
Minimum Instruction Time : 0
Group Time In : Minutes
Revisit Section : Yes
Action on Revisit Section : View and Edit
Navigate To Group Summary From Last Question? : No
Disable Submit Button During Assessment? : No
Section Selection Time? : 0
No of Optional sections to be attempted : 0

Java
Section Id : 640653129254
Section Number : 1
Section type : Online
Mandatory or Optional : Mandatory
Number of Questions : 16
Number of Questions to be attempted : 16
Section Marks : 100
Display Number Panel : Yes
Section Negative Marks : 0
Group All Questions : No
Enable Mark as Answered Mark for Review and
No
Clear Response :
Section Maximum Duration : 0
Section Minimum Duration : 0
Section Time In : Minutes
Maximum Instruction Time : 0
Sub-Section Number : 1
Sub-Section Id : 640653360288
Question Shuffling Allowed : No

Question Number : 1 Question Id : 6406531951399


Correct Marks : 0
Question Label : Multiple Choice Question
THIS IS QUESTION PAPER FOR THE SUBJECT "DIPLOMA LEVEL : PROGRAMMING CONCEPTS
USING JAVA (COMPUTER BASED EXAM)"

ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.

(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS
REGISTERED BY YOU)
Options :
6406536344543. Yes
6406536344544. No
Sub-Section Number : 2
Sub-Section Id : 640653360289
Question Shuffling Allowed : Yes

Question Number : 2 Question Id : 6406531951400


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the following Java program.

What is the maximum number of activation records on the stack during the execution of the
program?
Options :
6406536344545. 2
6406536344546. 3
6406536344547. 4
6406536344548. 5

Question Number : 3 Question Id : 6406531951403


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.

Choose the correct option regarding the given code.


Options :
6406536344557. This code generates output:

6406536344558. This code generates output:

6406536344559. This code generates output:

6406536344560. This code generates a compilation error because the method


cannot be overridden

Question Number : 4 Question Id : 6406531951404


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.
Choose the correct option.
Options :
6406536344561. The program generates output:

6406536344562. generates compilation error because a variable of type

cannot refer to an object of type .

6406536344563. generates run time error because there is ambiguity in which

method is being invoked.

6406536344564. The program generates output:

Question Number : 5 Question Id : 6406531951406


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.

Choose the correct option to fill in place of and so that the output is:

Options :

6406536344569.

6406536344570.

6406536344571.

6406536344572.
Question Number : 6 Question Id : 6406531951407
Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.

What will the output be?


Options :

6406536344573.

6406536344574.

6406536344575.

6406536344576.

Question Number : 7 Question Id : 6406531951414


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.
Identify the appropriate statements to fill in place of in order to correctly invoke method

inside the while loop.


Options :

6406536344601.

6406536344602.

6406536344603.

6406536344604. Method cannot be invoked from an outside class.

Sub-Section Number : 3
Sub-Section Id : 640653360290
Question Shuffling Allowed : Yes

Question Number : 8 Question Id : 6406531951401


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.

Choose the correct option.


Options :

6406536344549. This program generates compiler error at


Reason: An interface reference cannot be passed as a constructor argument.

6406536344550. This program generates the output:


6406536344551. This program generates the output:

followed by runtime error

Reason: A method inside is invoking inside , whereas

is invoking another method in .

6406536344552. This program generates compiler error at

Reason: A method inside is invoking a method defined in an interface.

Question Number : 9 Question Id : 6406531951402


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.
Choose the correct option.
Options :

6406536344553. Compilation error at because private variable


cannot be accessed without using an accessor method.

6406536344554. The program generates the output:

6406536344555. The program generates the output:

6406536344556. The program generates the output:

Question Number : 10 Question Id : 6406531951405


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the following Java code.
Identify the lines which have errors.
Options :
6406536344565. Line 7 and Line 11
6406536344566. Line 4 and Line 5
6406536344567. Line 15 and Line 20
6406536344568. Line 1 and Line 2

Question Number : 11 Question Id : 6406531951409


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.
Identify the correct option to fill in place of , such that the output is:

Options :

6406536344581.

6406536344582.

6406536344583.

6406536344584.
Question Number : 12 Question Id : 6406531951410
Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.

Choose the correct option.


Options :
6406536344585. This code generates the output:

6406536344586. This code generates the output:


6406536344587. generates compilation error because a variable of type

cannot refer to an object of type .

6406536344588. generates runtime error because there is ambiguity in which

method is being invoked.

Question Number : 13 Question Id : 6406531951411


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.

What will the output be?


Options :

6406536344589.
6406536344590.

6406536344591.

6406536344592.

Question Number : 14 Question Id : 6406531951412


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the code given below.

Choose the correct option to fill in place of so that the output is:
Options :

6406536344593.

6406536344594.

6406536344595.

6406536344596.

Question Number : 15 Question Id : 6406531951413


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.

Choose the correct option regarding the above code.


Options :

6406536344597. generates compilation error because the method

is not abstract.

6406536344598. generates compilation error because class


cannot implement two interfaces.

6406536344599. generates compilation error because class is


not declared as abstract.

6406536344600. , and generate compilation errors because the

methods , and are not abstract.

Sub-Section Number : 4
Sub-Section Id : 640653360291
Question Shuffling Allowed : Yes

Question Number : 16 Question Id : 6406531951408


Correct Marks : 8 Max. Selectable Options : 0
Question Label : Multiple Select Question
Consider the Java program below.

Identify the correct option(s) to fill in the blank at , such that the output is:

Options :

6406536344577.
6406536344578.

6406536344579.

6406536344580.
Indian Institute of Technology, Madras - BS in Data Science and Applications

Notations :
[Link] shown in green color and with icon are correct.
[Link] shown in red color and with icon are incorrect.

Change Font Color : No


Change Background Color : No
Change Theme : No
Help Button : No
Show Reports : No
Show Progress Bar : No

Java
Section Id : 640653134289
Section Number : 1
Section type : Online
Mandatory or Optional : Mandatory
Number of Questions : 16
Number of Questions to be attempted : 16
Section Marks : 100
Display Number Panel : Yes
Section Negative Marks : 0
Group All Questions : No
Section Maximum Duration : 0
Section Minimum Duration : 0
Section Time In : Minutes
Maximum Instruction Time : 0
Sub-Section Number : 1
Sub-Section Id : 640653373497
Question Shuffling Allowed : No

Question Number : 1 Question Id : 6406532035143 Question Type : MCQ


Correct Marks : 0
Question Label : Multiple Choice Question
THIS IS QUESTION PAPER FOR THE SUBJECT "DIPLOMA LEVEL : PROGRAMMING CONCEPTS
USING JAVA (COMPUTER BASED EXAM)"

ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.

(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS
REGISTERED BY YOU)
Options :
6406536627040. Yes
6406536627041. No
Sub-Section Number : 2
Sub-Section Id : 640653373498
Question Shuffling Allowed : Yes

Question Number : 2 Question Id : 6406532035144 Question Type : MCQ


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.
What will the output be?
Options :

6406536627042.

6406536627043.

6406536627044.

6406536627045.

Question Number : 3 Question Id : 6406532035146 Question Type : MCQ


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below that prints the credit points of courses. From among the

options, identify the appropriate function header for the function that takes as
input a list of courses and prints their credit points.
Choose the correct option.
Options :

6406536627050.

6406536627051.

6406536627052.

6406536627053.
Question Number : 4 Question Id : 6406532035148 Question Type : MCQ
Correct Marks : 6
Question Label : Multiple Choice Question
Consider the two Java files given below.

Choose the correct option.


Options :

6406536627058. and generate compilation errors.

6406536627059. Only
generates compilation error.

6406536627060. and generate compilation errors.

6406536627061. No compilation errors.

Question Number : 5 Question Id : 6406532035150 Question Type : MCQ


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below about controlling robot hardware values.

Choose the correct option.


Options :

6406536627066. and generate a compilation error because method

is already defined with the same signature.

6406536627067. and generate a compilation error because method

is already defined with the same signature.

6406536627068. Only generates a compilation error because method is


already defined with the same signature.

6406536627069. This program generates output:


Question Number : 6 Question Id : 6406532035156 Question Type : MCQ
Correct Marks : 6
Question Label : Multiple Choice Question
Consider the Java code given below.

Identify the appropriate option to fill in place of such that the output is:

Options :

6406536627090.

6406536627091.
6406536627092.

6406536627093.

Question Number : 7 Question Id : 6406532035157 Question Type : MCQ


Correct Marks : 6
Question Label : Multiple Choice Question
Consider the code given below.

Choose the correct option.


Options :

6406536627094. generates compilation error because method cannot be

invoked on .

6406536627095. This code generates the output followed by runtime Error at due to

ambiguity in .

6406536627096. This code generates the output:


6406536627097. This code generates the output:

Sub-Section Number : 3
Sub-Section Id : 640653373499
Question Shuffling Allowed : Yes

Question Number : 8 Question Id : 6406532035145 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.

Choose the correct option to be filled in place of so that the output is:
Options :

6406536627046.

6406536627047.

6406536627048.

6406536627049.

Question Number : 9 Question Id : 6406532035147 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question

The function is defined as:

If the specified key is not already associated with a value or is associated with , 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 .


Consider the Java code given below.
Choose the correct option.
Options :

6406536627054. generates a compilation error due to duplicate keys.

6406536627055. The program generates the output:

6406536627056. The program generates the output:

6406536627057. The program generates the output:

Question Number : 10 Question Id : 6406532035149 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the following Java code.
Choose the correct option when the class is executed as:

Options :

6406536627062. This code generates output:

6406536627063. This code generates AssertionError:

6406536627064. This code generates AssertionError:

6406536627065. This code generates AssertionError:

Question Number : 11 Question Id : 6406532035151 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the following Java code.
What will the output be?
Options :

6406536627070.

6406536627071.

6406536627072.

6406536627073.

Question Number : 12 Question Id : 6406532035152 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the Java code given below.
Choose the correct option to fill in place of so that the output is:

Please note the following methods from types and :

: Removes the object at the top of this stack and returns it.

: Retrieves and removes the head of this deque, or returns null if empty.

: Retrieves, but does not remove, the head of this deque, or returns null if empty.
Options :

6406536627074.

6406536627075.
6406536627076.

6406536627077.

Question Number : 13 Question Id : 6406532035153 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the code given below about an aircraft maintenance record.

What will the output be?


Options :
6406536627078.
6406536627079.

6406536627080.

6406536627081.

Question Number : 14 Question Id : 6406532035155 Question Type : MCQ


Correct Marks : 7
Question Label : Multiple Choice Question
Consider the following Java code that uses chained exceptions in the context of a sports match
analysis system.
What can the output of this code be?
Options :

6406536627086.

6406536627087.

6406536627088.
6406536627089.

Sub-Section Number : 4
Sub-Section Id : 640653373500
Question Shuffling Allowed : Yes

Question Number : 15 Question Id : 6406532035154 Question Type : MSQ


Correct Marks : 8 Max. Selectable Options : 0
Question Label : Multiple Select Question
Consider the Java code given below that should print the names of individuals whose BMI is
between 18 and 25 (both inclusive).

Choose the correct option(s) to fill in place of to obtain the right answer.
Options :

6406536627082.

6406536627083.
6406536627084.

6406536627085.

Sub-Section Number : 5
Sub-Section Id : 640653373501
Question Shuffling Allowed : Yes

Question Number : 16 Question Id : 6406532035158 Question Type : MSQ


Correct Marks : 7 Max. Selectable Options : 0
Question Label : Multiple Select Question

Consider the code given below. maps each element of to its


frequency of occurrence in list.

Identify the appropriate option(s) to fill in the blank at , such that the output is:

Options :
6406536627098.
6406536627099.

6406536627100.

6406536627101.

You might also like