Read my post above again - if you defined T to extends Number, there will be no need to cast (which defeats the purpose of generics anyways)
see Number (Java Platform SE 6)
public class...
Type: Posts; User: copeg
Read my post above again - if you defined T to extends Number, there will be no need to cast (which defeats the purpose of generics anyways)
see Number (Java Platform SE 6)
public class...
First, you can't iterate over a generic list expecting it to be a double (this is the compile time checking at work that makes generics so powerful). You need to iterate over the list using the...