2 min read

Weekly Engineering Mastery Quiz (2026-03-23 to 2026-03-27)

A 20-question assessment covering fundamentals, implementation best practices, and advanced architecture insights from this week’s learning posts.

#Learning-log#Quiz#Assessment Weekly Quiz

Table of contents

  1. Interactive Quiz

Weekly engineering recap (Europe/London) Coverage: 2026-03-23 → 2026-03-27 • Run date: 2026-03-29

Focus: Kotlin — Variables & Types (Fundamental refresher)

Key takeaways

  • val vs var: val is a read‑only reference (single assignment); var is reassignable. Object mutability is independent of reference mutability.
  • Type inference: The compiler infers types from initializers. For integer literals, inference starts at Int and widens to Long when needed; floating literals default to Double.
  • Basic types: Numbers (Byte/Short/Int/Long, U* variants, Float/Double), Boolean, Char, and String behave like classes with operators and utilities; there are no implicit numeric widenings.
  • String templates: Use $name and ${expr}. Triple‑quoted strings (""") support raw text; use ${’$’} for a literal dollar. New multi‑dollar interpolation (experimental) lets you require multiple $ to trigger interpolation.
  • Any, Unit, Nothing: Any is the root of all non‑null types; Unit is a single‑value return type for “no meaningful value”; Nothing is the bottom type (expressions that never return, e.g., throw or error).
  • Practical tips: Prefer val by default; add explicit types when inference is unclear (e.g., empty collections); avoid referential equality (===) for boxed numbers on the JVM; use == for value equality.
  • 2026 notes: IDEs use the K2 compiler frontend by default in Kotlin 2.x; expect clearer diagnostics and some stricter checks. Review plugin compatibility and migration notes. Multi‑dollar string interpolation is available as an experimental feature.

Interactive Quiz

Use the interactive quiz section below to answer each question and get instant feedback.

Interactive Quiz

Score: 0 / 20 | Answered: 0 / 20

Q1 In Kotlin, which statement about val is correct?

Fundamentals

Select one option.

Q2 Which best describes Kotlin’s type inference?

Fundamentals

Select one option.

Q3 Which declaration is inferred as Long by the compiler?

Fundamentals

Select one option.

Q4 Which string correctly embeds s.length using templates?

Fundamentals

Select one option.

Q5 Which of the following snippets compile? (Assume they’re in the same scope.)

Fundamentals

Select one or more options.

Q6 What does val list = mutableListOf(1) guarantee?

Intermediate

Select one option.

Q7 Given fun f(x: Double), which call compiles without conversion?

Intermediate

Select one option.

Q8 Which boolean expression evaluates to true?

Intermediate

Select one option.

Q9 Which literal is a Char?

Intermediate

Select one option.

Q10 In a triple‑quoted string, which snippets ensure a literal $ appears (not interpolation)?

Intermediate

Select one or more options.

Q11 Which statement about Any, Unit, and Nothing is correct?

Intermediate

Select one option.

Q12 Which statements about Kotlin’s type inference are true?

Intermediate

Select one or more options.

Q13 Which function signature indicates the function never returns normally?

Advanced

Select one option.

Q14 Which property override is allowed in Kotlin?

Advanced

Select one option.

Q15 Which statement about const val is correct?

Advanced

Select one option.

Q16 K2 compiler migration facts (select all that apply):

Advanced

Select one or more options.

Q17 What is the type of println("hi")?

Advanced

Select one option.

Q18 On the JVM, which statement about numbers and referential equality (===) is correct?

Advanced

Select one option.

Q19 Which uses of Nothing enable type‑checking?

Advanced

Select one or more options.

Q20 Which statement about Any and Any? is correct?

Advanced

Select one option.

References

Share

More to explore

Keep exploring

Previous

Flutter Layout from the Inside Out: Constraints, Stacks, and the Widgets That Keep You Sane

Next

Kotlin Language: Variables & Types Refresher