18 Variables & Types questions from the Kotlin bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
B.a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
C.the root supertype from which every non-nullable type ultimately descends
D.an automatic conversion to a more specific type after a check, letting later code use it without manual casting
Answer + AI explanation with Pro
2. Which term means: "a read-only declaration that can be assigned exactly once and cannot be reassigned afterward"?
Junior
A.Smart cast
B.val
C.var
D.Any
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.val — the root supertype from which every non-nullable type ultimately descends
B.val — a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
C.val — the type with a single value returned by functions that produce no meaningful result
D.val — the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
Answer + AI explanation with Pro
4. What is var?
Junior
A.the type with a single value returned by functions that produce no meaningful result
B.a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
C.the root supertype from which every non-nullable type ultimately descends
D.a mutable declaration whose binding can be reassigned multiple times
Answer + AI explanation with Pro
5. Which term means: "a mutable declaration whose binding can be reassigned multiple times"?
Junior
A.var
B.Any
C.Type inference
D.Smart cast
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.var — an automatic conversion to a more specific type after a check, letting later code use it without manual casting
B.var — the type with a single value returned by functions that produce no meaningful result
C.var — a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
D.var — a mutable declaration whose binding can be reassigned multiple times
Answer + AI explanation with Pro
7. What is Type inference?
Junior
A.a mutable declaration whose binding can be reassigned multiple times
B.a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
C.the type with a single value returned by functions that produce no meaningful result
D.the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
Answer + AI explanation with Pro
8. Which term means: "the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation"?
Junior
A.Smart cast
B.Unit
C.Any
D.Type inference
Answer + AI explanation with Pro
9. Which statement is correct?
Junior
A.Type inference — an automatic conversion to a more specific type after a check, letting later code use it without manual casting
B.Type inference — a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
C.Type inference — the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
D.Type inference — the root supertype from which every non-nullable type ultimately descends
Answer + AI explanation with Pro
10. What is Smart cast?
Mid
A.the root supertype from which every non-nullable type ultimately descends
B.the type with a single value returned by functions that produce no meaningful result
C.a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
D.an automatic conversion to a more specific type after a check, letting later code use it without manual casting
Answer + AI explanation with Pro
11. Which term means: "an automatic conversion to a more specific type after a check, letting later code use it without manual casting"?
Mid
A.Smart cast
B.Type inference
C.Any
D.val
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Smart cast — an automatic conversion to a more specific type after a check, letting later code use it without manual casting
B.Smart cast — the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
C.Smart cast — the root supertype from which every non-nullable type ultimately descends
D.Smart cast — a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
Answer + AI explanation with Pro
13. What is Any?
Mid
A.the root supertype from which every non-nullable type ultimately descends
B.a read-only declaration that can be assigned exactly once and cannot be reassigned afterward
C.the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
D.an automatic conversion to a more specific type after a check, letting later code use it without manual casting
Answer + AI explanation with Pro
14. Which term means: "the root supertype from which every non-nullable type ultimately descends"?
Mid
A.Any
B.Type inference
C.val
D.Smart cast
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.Any — the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
B.Any — the root supertype from which every non-nullable type ultimately descends
C.Any — the type with a single value returned by functions that produce no meaningful result
D.Any — a mutable declaration whose binding can be reassigned multiple times
Answer + AI explanation with Pro
16. What is Unit?
Mid
A.the type with a single value returned by functions that produce no meaningful result
B.a mutable declaration whose binding can be reassigned multiple times
C.the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
D.an automatic conversion to a more specific type after a check, letting later code use it without manual casting
Answer + AI explanation with Pro
17. Which term means: "the type with a single value returned by functions that produce no meaningful result"?
Mid
A.Smart cast
B.Unit
C.Type inference
D.var
Answer + AI explanation with Pro
18. Which statement is correct?
Mid
A.Unit — an automatic conversion to a more specific type after a check, letting later code use it without manual casting
B.Unit — the type with a single value returned by functions that produce no meaningful result
C.Unit — a mutable declaration whose binding can be reassigned multiple times
D.Unit — the compiler's ability to deduce a declaration's type from its initializer without an explicit annotation
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Variables & Types question come with Pro.