types - Java- Identifying ints and doubles -


i want write conditional statement, depending on whether variable int or double, i.e

if (x double)   stuff else if(x int)   stuff else   stuff 

i know might not idea, choice now. possible?

i have no idea how x int or double without knowing @ compile time, but

void dostuff(int x) {     stuff... }  void dostuff(double x) {     stuff... } 

then

dostuff(x) 

will call appropriate method.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -