int calculate() {
    int result = 42;
    return result;
}

void main() {
    IO.println(calculate());
    IO.println(result);
}

// From Groundwork, chapter 6 (ch06-methods), box 11.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch06_11.java
// This fails on purpose: it does not compile—A variable used outside the method that created it, which javac refuses. The error message is the lesson.
