These are designed to trip you up. Click "Reveal Answer" to study each one.
val list = mutable.ArrayBuffer(1,2,3) — you can't reassign list, but you CAN do list += 4.== checks value equality (like Java's .equals). eq checks reference equality (same object in memory, like Java's ==). In Scala, you almost always want ==.sealed trait Shape; case class Circle(r: Double) extends Shape; case class Square(s: Double) extends ShapeNothing is the bottom type — a subtype of EVERY other type. It has no instances. It's the return type of expressions that never return normally: throw new Exception has type Nothing. This is why Nil (empty list) is List[Nothing] — it can be assigned to any List[T].It's not just about knowing answers — it's about how you deliver them.
"A Future is like ordering takeout..." — shows you truly understand the concept, not just memorized the definition.
Then follow with the precise definition. "A Future represents an async computation that will eventually complete with a value or failure."
"Immutability is great for safety, but creates more garbage collection pressure. For hot paths, mutable may be justified." This shows senior-level thinking.
"In our system, we used Akka actors for order processing because..." Even hypothetical scenarios show applied knowledge.
"I haven't used ZIO in production, but I understand it provides..." Honesty with awareness beats faking it every time.
If your Scala code is full of var, you're writing Java in Scala. Use val by default, use functional transformations instead of mutation.
Using .get on an Option defeats the purpose. Always pattern match or use .getOrElse, .map, .fold.
Using Await.result in production code blocks threads. Use .map/.flatMap or for-comprehensions instead.
Too many implicits make code unreadable. Use them for well-known patterns (ExecutionContext, Codec) not for business logic.
Using mutable collections in multi-threaded code without synchronization = race conditions. Use immutable collections or actors.
Calling .collect() on a 100GB DataFrame brings ALL data to the driver — instant OutOfMemoryError. Use aggregations first.
Real interview speed. How many can you get right?
List(1,2,3).map(_ * 2).filter(_ > 3)None have?List[+A]. What does the + mean?Go back to any module you scored low on. Each module is independent — jump directly to what you need.
Use the Scala REPL to try the code examples. Muscle memory is real — type the code, don't just read it.
Explain each concept out loud. If you can teach it, you know it. Practice the metaphor-first approach from Screen 2.