Question 1 | MCQ
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)
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)
Solution
Consider the code given below.

Which of the following isNOT trueabout the given code?
Which of the following isNOT trueabout the given code?
Solution
Consider the code given below.

How many activation records are created on the stack during the execution of the code?
How many activation records are created on the stack during the execution of the code?
Solution
Consider the Java code given below.

Choose all the options which can be used in place ofARGinLINE 1so that the code outputs the sum of two coordinates.
Choose all the options which can be used in place ofARGinLINE 1so that the code outputs the sum of two coordinates.
Solution
Consider the following Java code.

Identify the line/s which has/have errors.
Identify the line/s which has/have errors.
Solution
Consider the Java code given below.

Choose the correct option.
Choose the correct option.
Solution
Consider the Java code given below.

What will happen when the button (labelled "Press") is clicked?
What will happen when the button (labelled "Press") is clicked?
Solution
Consider the Java code given below.

Choose the correct options to be filled in place ofCODE SEGMENTso that the label displays the text entered in the text field.
Choose the correct options to be filled in place ofCODE SEGMENTso that the label displays the text entered in the text field.
Solution
Consider the Java code given below.

Which of the following options is/are possible result/s of the above code?
Which of the following options is/are possible result/s of the above code?
Solution
Consider the Java code given below.

Which of the following is/are possible output(s) of the above code?
Which of the following is/are possible output(s) of the above code?
Solution
Assume that the file fruits.txt contains the following lines:

Consider the code given below.

Choose the correct option.
Consider the code given below.
Choose the correct option.
Solution
Consider the Java code given below.

What will the output be?
What will the output be?
Solution
Consider the Java code given below.

What will the output be?
What will the output be?
Solution
MethodOptional.ofNullable(T value)returns anOptionalthat describes the specific value, if non-null; otherwise returns anempty Optional.
Based on this description, consider the code given below, and answer the given question.

Choose the correct option.
Based on this description, consider the code given below, and answer the given question.
Choose the correct option.
Solution
Consider the following Java code.


What will the output be?
What will the output be?
Solution
Consider the Java code given below.



Identify the appropriate statement to fill in the blank atLINE 1, such that the output is:

Identify the appropriate statement to fill in the blank atLINE 1, such that the output is:
Solution
Methodmergeof interfaceMaphas the following structure and functionality:

If the specified key is not already associated with a value or is associated withnull, 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 isnull.
Consider the code given below that uses the merge method to combine two maps, and answer the given question.

Choose the correct option regarding the code.
If the specified key is not already associated with a value or is associated withnull, 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 isnull.
Consider the code given below that uses the merge method to combine two maps, and answer the given question.
Choose the correct option regarding the code.
Solution
Consider the code given below.


Identify the appropriate function header for functionsum, such that the output is78.0, 33.5.
Identify the appropriate function header for functionsum, such that the output is78.0, 33.5.
Solution
Consider the following Java code.

Choose the correct option when the class is executed as:
java -ea ShoppingTest
Choose the correct option when the class is executed as:
java -ea ShoppingTest
Solution
Consider the following Java code that uses chained exceptions.


Which of following can be the output of this code?
Which of following can be the output of this code?
Solution
Consider the code given below.

Choose the correct option.
Choose the correct option.
Solution
Consider the code given below.

Choose the correct option to fill in place ofCODE BLOCKso that the output is:

Choose the correct option to fill in place ofCODE BLOCKso that the output is:
Solution
Consider the Java code given below.

Choose the correct option.
Choose the correct option.
Solution
Consider the Java code given below.

What will the output be?
What will the output be?
Solution
Shape
Thickness [ / ]
3
All colors