It's been a while, but I think the class Integer could be what you're looking for. However, I'm just guessing at what some<6> may do in C++, haven't worked with generics in C++ much.
Hm, I'm not aware of a feature like that in Java, no. You can always have an int in the constructor of course but that's as good as it gets for all I know.
Comment