Learning note / Reflections on my studies
Java Programming
Java makes me think about how a program is organized as well as what it does. The part I find useful is deciding which piece of code should own a responsibility and how the pieces should interact.
Beyond one long sequence of instructions
A program becomes harder to follow when every operation can change everything else. Classes give me a way to group related state and behavior so I can reason about a smaller part at a time.
The useful question is not how many classes to create. It is whether another person could understand what each one is responsible for.
Making expectations explicit
Types and method signatures make the boundaries between pieces of code more visible. I can look at a method and ask what information it needs, what it returns, and how a caller should handle failure.
Encapsulation matters for the same reason: changing an internal detail should not force every caller to understand that detail.
What I carry into other languages
I connect this way of thinking to TypeScript and React work too. A component or module is easier to maintain when its inputs are clear and its responsibilities stay focused. The syntax changes, but that design habit transfers.
What I take forward
- Give each class a clear responsibility.
- Use types to communicate expectations.
- Keep implementation details behind a useful interface.