Level 1 · Apprentice0 XP
The first hour: variables, functions and expressions, and what you can stop typing.
Step 1 / 5
ProblemA Java method builds a greeting: a null check, a local variable declared with its type twice, an if statement that assigns it, string concatenation with plus signs, and three overloads for optional parameters. The idea fits in one sentence.
← → step
Before this: Measuring Java performance
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Rewrite a small Java method of yours in Kotlin with no var, no explicit types that can be inferred, a when expression in place of if/else if, and one default argument. Count the lines before and after.