examples of OOP programming in java