Comparing the values of two generic Numbers

Posted by PartlyCloudy on Stack Overflow See other posts from Stack Overflow or by PartlyCloudy
Published on 2010-04-21T13:19:54Z Indexed on 2010/04/21 13:23 UTC
Read the original article Hit count: 161

Filed under:
|

I want to compare to variables, both of type T extends Number. Now I want to know which of the two variables is greater than the other or equal. Unfortunately I don't know the exact type yet, I only know that it will be a subtype of java.lang.Number. How can I do that?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about generics