Wholeheartedly agree with both of you, Correction and Kaylia. Regrettably, I've seen similar things done. I wasn't suggesting that learning things like Swing or AWT was a genuinely good idea, but it's not quite impossible to do either of those without resorting to Kaylia's instruction strategy first. Perhaps the instructor picked that route just so that students could easily see a result to the work they've invested? I don't know.
Yeah, you can get away with arrays and linearly searching them. No big deal there. Just need to explain how to create them, the if syntax, and how to do a loop. You will get to this in the introductory course. I see what you mean now.
Basic implementation of a stack, though... you can explain the principles, but this one is honestly more challenging. The prerequisite for this in Java is an understanding of object-oriented design, despite not taking much more than an array and an index.
Then, after you teach them out to write the stack, you can tell them to forget it and just import java.util.Deque and ArrayDeque instead. Whee, generics.
Speaking of enumerations (earlier in the thread) and generics and Collections that I indirectly referenced just now, here's a completely useless (to the original poster) solution to the problem presented earlier of containing months in an object. It just shows some basic usage of a couple things I just mentioned; maybe someone can find some value from it. This is explained more fully in Effective Java, 2nd edition, item #30 (enums instead of int constants).
Spoiler: show
XI Wiki


