21 real Core Language questions from the Java bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is Primitive type?
Junior
A.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
B.a 16-bit unsigned primitive that stores a single UTF-16 code unit
C.a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values
D.a 32-bit signed integer primitive with a range of about minus two billion to two billion
A.Primitive type — a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values
B.Primitive type — an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
C.Primitive type — the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
D.Primitive type — a built-in value type like int or boolean that is not an object and holds its value directly on the stack
5. Which term means: "an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections"?
A.Wrapper class — a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
B.Wrapper class — an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
C.Wrapper class — a 32-bit signed integer primitive with a range of about minus two billion to two billion
D.Wrapper class — a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values
8. Which term means: "the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer"?
A.Autoboxing — an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
B.Autoboxing — a 16-bit unsigned primitive that stores a single UTF-16 code unit
C.Autoboxing — the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
D.Autoboxing — a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values
A.int — a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values
B.int — a 32-bit signed integer primitive with a range of about minus two billion to two billion
C.int — a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
D.int — a 16-bit unsigned primitive that stores a single UTF-16 code unit
20. Which term means: "a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values"?
A.Integer cache — the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
B.Integer cache — a 16-bit unsigned primitive that stores a single UTF-16 code unit
C.Integer cache — a built-in value type like int or boolean that is not an object and holds its value directly on the stack
D.Integer cache — a JVM optimization that reuses cached wrapper objects for small values from minus 128 to 127, which can make == appear to work for those values
Answers, AI explanations, and a scored voice mock interview
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.