Comparing the values of two generic Numbers
- by PartlyCloudy
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!