MauryaHub PYQ Practice

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

Programming Concepts using Java · End Term · Jan 2025 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 / 25 published solutions

Question 94 MSQ · 3.0 marks

Which of the following statements are correct based on the KKT conditions and the solution to the optimization problem?
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 Q94

Question 95 NAT · 3.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q95

Question 97 MCQ · 4.0 marks

Source diagram or notation
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 Q97

Question 98 MCQ · 4.0 marks

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 Q98

Question 99 MCQ · 4.0 marks

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 Q99

Question 100 MCQ · 4.0 marks

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 Q100

Question 101 MCQ · 4.0 marks

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 Q101

Question 102 MCQ · 4.0 marks

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 Q102

Question 103 MCQ · 4.0 marks

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 Q103

Question 104 MCQ · 4.0 marks

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 Q104

Question 105 MCQ · 4.0 marks

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 Q105

Question 106 MCQ · 4.0 marks

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 Q106

Question 107 MCQ · 4.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 Q107

Question 108 MCQ · 4.0 marks

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 Q108

Question 109 MCQ · 4.0 marks

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 Q109

Question 110 MCQ · 5.0 marks

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 Q110

Question 111 MCQ · 5.0 marks

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 Q111

Question 112 MCQ · 5.0 marks

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 Q112

Question 113 MCQ · 5.0 marks

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 Q113

Question 114 MSQ · 4.0 marks

Which of the following statements is/are correct regarding garbage collection?
A.
The garbage collector frees unused memory in the heap.
B.
The garbage collector frees unused memory in the stack.
C.
The mark-and-sweep is a common garbage collection technique.
D.
The garbage collection eliminates all memory leaks in every situation.

A published solution is not available for this question yet.

Report a correction for Q114

Question 115 MSQ · 4.0 marks

Consider the Java code given below. import java.util.concurrent .ConcurrentHashMap; class AddItemThread extends Thread { private ConcurrentHashMap<String, Integer> cart; public AddItemThread(ConcurrentHashMap<String, Integer> c) { cart = c; 3 public void run() { cart.put("item3", 1); cart.put("item4", 2); £ } class ListItemThread extends Thread { private ConcurrentHashMap<String, Integer> cart; public ListItemThread(ConcurrentHashMap<String, Integer> c) { cart = c; } public void run() { for (String item : cart.keySet()) { System.out.println(item + ": " + cart.get(item)); 3 } public class ShoppingCart { public static void main(String[] args) { ConcurrentHashMap<String, Integer> cart = new ConcurrentHashMap<>() ; cart.put("itemi", 1); cart.put("item2", 2); AddItemThread addItemThread = new AddItemThread(cart) ; ListItemThread listItemThread = new ListItemThread(cart) ; addItemThread.start(); listItemThread.start() ; try { addItemThread. join() ; listItemThread. join(); } catch (InterruptedException e) { e.printStackTrace() ; } System.out.println("Final Cart: " + cart); } Which of the following is true about the given code.
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q115

Question 116 MSQ · 4.0 marks

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 Q116

Question 117 MSQ · 4.0 marks

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 Q117

Question 118 MSQ · 6.0 marks

Source diagram or notation
A.
Line 2
B.
Line 7
C.
Line 11
D.
Line 12
E.
Line 16
F.
Line 20
G.
Line 21

A published solution is not available for this question yet.

Report a correction for Q118

Question 119 MSQ · 6.0 marks

Consider the Java code given below. import java.awt.*; import javax.swing.*; import java.awt.event.*; class TokenSystem extends JFrame implements ActionListener { JButton btnTakeToken, btnCancelToken; JLabel label; JPanel pi, p2; public TokenSystem() { pi = new JPanel(); p2 = new JPanel(); btnTakeToken = new JButton("Take Token") ; btnCancelToken = new JButton("Cancel Token") ; label = new JLabel("Please select an option"); pi.add(btnTakeToken) ; pi.add(btnCancelToken) ; p2.add(label) ; add(pi, "Center"); add(p2, "South"); btnTakeToken. setActionCommand("TakeToken") ; btnCancelToken.setActionCommand("CancelToken") ; btnTakeToken. addActionListener (this) ; btnCancelToken.addActionListener (this) ; setSize(350, 150); setVisible(true) ; 3 public void actionPerformed(ActionEvent e) { // CODE SEGMENT B z public class HospitalQueue { public static void main(String[] args) { new TokenSystem() ; BF i
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation
      **Appdev2** **Section Id :** 64065387636 **Section Number :** 6 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 31 **Number of Questions to be attempted :** 31 **Section Marks :** 100

A published solution is not available for this question yet.

Report a correction for Q119