Question#1 A variable declared within a class but outside any method, constructor, or block is called an _____. a) static variable b) instance variable ✅- Answer c) class variable d) local variable Question#2 The process of converting a higher data type to a lower data type is called _____. a) auto boxing b) type coercion c) explicit casting ✅- Answer d) implicit casting Question#3 A class variable in Java is declared using the _____ keyword. a) final b) private c) transient d) static ✅- Answer Question#4 The automatic conversion of a primitive data type to its wrapper class is known as _____. a) type coercion b) narrowing c) autoboxing ✅- Answer d) unboxing Question#5 The 'if-else-if ladder' creates a _____ structure where the program enters the block whose condition is true. a) recursion b) loop c) decision tree ✅- Answer d) sequence Question#6 In Java, the process of changing the value of one data type into another is known as _____. a) type conversion ✅- Answer b) type declaration c) type propagation d) type inference Question#7 Each instance of a class has its own copy of _____. a) instance variables ✅- Answer b) static variables c) local variables d) class variables Question#8 The 'default' statement in a switch block is executed if _____ match. a) no cases ✅- Answer b) last case c) all cases d) first case Question#9 In Java, primitive types can be represented as objects using _____. a) generic classes b) superclasses c) wrapper classes ✅- Answer d) abstract classes Question#10 Variables declared within a method, constructor, or code block are called _____. a) static variables b) persistent variables c) global variables d) local variables ✅- Answer Question#11 The reverse process of autoboxing is called _____. a) unboxing ✅- Answer b) promotion c) boxing d) narrowing Question#12 Assigning a smaller data type value to a larger data type is called _____ casting. a) implicit ✅- Answer b) explicit c) coercive d) manual Question#13 A switch case variable cannot be a _____. a) float ✅- Answer b) String c) int d) char Question#14 If we do not explicitly assign a value, instance variables are initialized with _____. a) zero b) undefined c) default values ✅- Answer d) null Question#15 The process of converting 'String' to 'int' is accomplished using _____. a) String.valueOf() b) parseString() c) Double.parseDouble() d) Integer.parseInt() ✅- Answer Question#16 To access a class variable, you use the _____ name. a) block b) object c) method d) class ✅- Answer Question#17 A variable's lifespan is limited to the block where it is declared if it is a _____. a) local variable ✅- Answer b) static variable c) global variable d) instance variable Question#18 Java's control flow statements include decision making, loop, and _____ statements. a) jump ✅- Answer b) recursion c) allocation d) declaration Question#19 The syntax 'if(condition) { statement; }' represents a _____ statement. a) if-else b) switch c) nested if d) simple if ✅- Answer Question#20 The boolean expression of an if statement evaluates to either _____ or false. a) null b) true ✅- Answer c) void d) zero