Question#1 A _____ loop in Java checks its condition after executing the loop body, guaranteeing at least one execution of the body. a) for-each b) do-while ✅- Answer c) for d) while Question#2 The enhanced for loop in Java, often called the _____ loop, is mainly used for traversing arrays and collections without index management. a) nested b) for-each ✅- Answer c) do-while d) while Question#3 The _____ statement in Java skips the remaining statements in the current iteration and jumps to the next iteration of the loop. a) exit b) continue ✅- Answer c) break d) return Question#4 A Java array can only store a _____ set of elements and must be of the same data type. a) random b) unlimited c) fixed ✅- Answer d) dynamic Question#5 The Java keyword used to trigger the garbage collector explicitly is _____. a) Garbage.run() b) gc.collect() c) Collect.memory() d) System.gc() ✅- Answer Question#6 The _____ statement in Java transfers program control to the statement following the enclosing loop or switch. a) next b) continue c) exit d) break ✅- Answer Question#7 The entry point for accessing command-line arguments in a Java program is the _____ parameter of the main method. a) cmdArgs b) mainArgs c) args ✅- Answer d) arguments Question#8 A multidimensional array in Java is actually an array of _____. a) objects b) primitives c) arrays ✅- Answer d) methods Question#9 By _____ a reference variable, its referenced object becomes eligible for garbage collection. a) incrementing b) nulling ✅- Answer c) copying d) creating Question#10 In a for loop, the initialization, condition, and increment/decrement are specified in a _____ line. a) single ✅- Answer b) random c) separate d) three Question#11 A for loop is preferred over other loops in Java when the exact number of _____ is known. a) arguments b) iterations ✅- Answer c) arrays d) objects Question#12 Arrays in Java are stored in _____ memory locations, allowing efficient access by index. a) virtual b) separate c) segregated d) contiguous ✅- Answer Question#13 A _____ in Java is an object that allows dynamic resizing and belongs to the Collections Framework. a) Stack b) TreeSet c) LinkedList d) ArrayList ✅- Answer Question#14 A while loop in Java evaluates its condition _____ entering the loop body. a) during b) before ✅- Answer c) randomly d) after Question#15 A Java multidimensional array with three indices is known as a _____. a) 2D array b) vector array c) 3D array ✅- Answer d) multi-array Question#16 Command line arguments in Java are always treated as type _____. a) Character b) Object c) Integer d) String ✅- Answer Question#17 Using _____ in Java can reclaim memory occupied by unreferenced objects automatically. a) reference counting b) manual memory management c) garbage collection ✅- Answer d) static allocation Question#18 The break statement in Java can never be used _____ in the program but must be inside a loop or switch. a) independently ✅- Answer b) with return c) after continue d) recursively Question#19 The property used to determine the total number of elements in a Java array is _____. a) capacity b) count c) length ✅- Answer d) size() Question#20 Assigning one object reference to another in Java can make the original object eligible for _____. a) compilation b) garbage collection ✅- Answer c) inheritance d) serialization