October 2025
Intermediate to advanced
100 pages
2h 27m
English
| Puzzle 6 | Which Came First? |
| | object Chicken { |
| | val comesAfter: String = Egg.comesAfter |
| | } |
| | |
| | object Egg { |
| | val comesAfter: String = Chicken.comesAfter |
| | } |
| | |
| | fun main() { |
| | println("The chicken comes after: " + Chicken.comesAfter) |
| | println("The egg comes after: " + Egg.comesAfter) |
| | } |
Guess the Output | |
|---|---|
|
|
Try to guess the output (or error) before moving to the next page. |
The program displays the following output:
| | The chicken comes after: null |
| | The egg comes after: null |
Read now
Unlock full access