You are about to begin your journey into Overloading, it's an essential part of the Polymorphism.
The first result from Google is just enough to give you an idea.
This topics are the basic topics for every Java programmer and in general for every programmer who wants to code in an OO way, i suggest to pick a good book that can teach you the basic stuff or a good online resourcegood online resource.