Personally I am against any more changes to core Java language at least for quite some time; but one feature that I really like to be part of Java is ADA like subtyping.
A subtype is a type whose values are a subset of the values of some type. So a subtype is characterized by:
A base type
A set of values which is a subset of the set of values of the base type
The same operations as the base type
It is a very elegant and clean way of checking the values of types at compile typing with out throwing lot of exception. E.g. instead of throwing an ArithmeticException inside your method because in parameter is less than 0; you can create a subtype of Integer with Range from 1..1000. |