xThe article was originally published at cchacin.github.ioUPDATE: Editorial changes were made to improve the readability, thanks to Shefali AgarwalJava is an object-oriented language with some functional aspects included in its core. Like any other object-oriented language, classes and objects are the foundations of any functionality that we can write and use and the relationships between the classes/objects make it possible to extend and reuse functionality. However, the way that we choose to b...