Core Language interview questions

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
  1. A.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  2. B.a 16-bit unsigned primitive that stores a single UTF-16 code unit
  3. 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
  4. D.a 32-bit signed integer primitive with a range of about minus two billion to two billion
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. 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
  2. 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
  3. 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
  4. 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
Reveal the answer + AI explanation — free account

4. What is Wrapper class?

Junior
  1. A.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  2. B.the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
  3. C.an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
  4. D.a 16-bit unsigned primitive that stores a single UTF-16 code unit
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Wrapper class — a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
  2. 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
  3. C.Wrapper class — a 32-bit signed integer primitive with a range of about minus two billion to two billion
  4. 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
Reveal the answer + AI explanation — free account

7. What is Autoboxing?

Mid
  1. A.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  2. B.a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
  3. C.the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
  4. D.an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. 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
  2. B.Autoboxing — a 16-bit unsigned primitive that stores a single UTF-16 code unit
  3. C.Autoboxing — the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
  4. 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
Reveal the answer + AI explanation — free account

10. What is int?

Junior
  1. A.a 16-bit unsigned primitive that stores a single UTF-16 code unit
  2. B.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  3. C.an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
  4. D.a 32-bit signed integer primitive with a range of about minus two billion to two billion
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Junior
  1. 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
  2. B.int — a 32-bit signed integer primitive with a range of about minus two billion to two billion
  3. C.int — a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
  4. D.int — a 16-bit unsigned primitive that stores a single UTF-16 code unit
Reveal the answer + AI explanation — free account

13. What is long?

Mid
  1. A.a 16-bit unsigned primitive that stores a single UTF-16 code unit
  2. B.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  3. 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
  4. D.a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.long — an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
  2. B.long — a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
  3. C.long — a 32-bit signed integer primitive with a range of about minus two billion to two billion
  4. D.long — the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
Reveal the answer + AI explanation — free account

16. What is char?

Mid
  1. A.a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  2. B.a 16-bit unsigned primitive that stores a single UTF-16 code unit
  3. 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
  4. D.an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Mid
  1. A.char — a 32-bit signed integer primitive with a range of about minus two billion to two billion
  2. B.char — the automatic conversion the compiler performs between a primitive and its corresponding wrapper object, e.g. assigning an int to an Integer
  3. C.char — a built-in value type like int or boolean that is not an object and holds its value directly on the stack
  4. D.char — a 16-bit unsigned primitive that stores a single UTF-16 code unit
Reveal the answer + AI explanation — free account

19. What is Integer cache?

Senior
  1. A.a 64-bit signed integer primitive used when values exceed the 32-bit range, written with an L suffix
  2. B.an object form of a primitive, such as Integer for int or Boolean for boolean, used where objects are required like in collections
  3. C.a 16-bit unsigned primitive that stores a single UTF-16 code unit
  4. D.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
Reveal the answer + AI explanation — free account

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"?

Senior
  1. A.Autoboxing
  2. B.Primitive type
  3. C.char
  4. D.Integer cache
Reveal the answer + AI explanation — free account

21. Which statement is correct?

Senior
  1. 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
  2. B.Integer cache — a 16-bit unsigned primitive that stores a single UTF-16 code unit
  3. 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
  4. 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
Reveal the answer + AI explanation — free account

Free to start

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.

Practice Core Language free