add Java solution for demonstrating method overloading