If you want to write a method that can take different kind of primitive types, you should take a look at the concept of overloading. Look at how System.println is implemented for different argument types, for example.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
parse them all as doubles to begin with. then see if any of them have any decimal digits - that is, if the integer part of them is equal to the entirety of them or not. if there aren't any decimals, it's an integer.
well, if i were you, i'd check the API docs. there's a method or two in the class "Double" that might be useful for extracting the integer part of a Double, and then all you have to do is a quick comparison...