let say I have this code
Map list = new HashMap(); list.put(\"number1\", \"one\"); list.put(\"number2\", \"two\")
There is no typedef equivalent in Java, and there is no common idiom for aliasing types. I suppose you could do something like
typedef
class StringMap extends HashMap {}
but this is not common and would not be obvious to a program maintainer.