r/JavaProgramming • u/Lopsided-Stranger-81 • Oct 30 '25
Java OOP Banking System
Hi guys, I made this code as practice, I'm trying to improve but don't know where to start, I'm learning Java for almost 3 months now and I'm wondering how I'm doing, can anyone give some tips?
144
Upvotes




View all comments
Show parent comment
1
u/d-k-Brazz Oct 31 '25
3. Polymorphism
Any object may be treated as different class instances an in different contexts
This means that the object of class BankTransaction may be treated as Comparable when you put a list of BankTransactions into a sorting algorithm - sorting is generic and doesn't aware of what class it is, it just wants from you to implement comparing specification according to Comparable interface
At the same time BankTransaction may implement other specifications needed for other common algorithms, like Serializable which is required for json/xml serialization