void main() {
    String word = "Lava";
    word.charAt(0) = 'J';
}

// From Groundwork, chapter 8 (ch08-strings-as-data), box 2.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch08_02.java
// This fails on purpose: it does not compile—One character of a String is assigned to, which javac refuses: a String cannot be changed. The error message is the lesson.
