You've not seen ugly code until you've read 90s-era Win32 UI code written with Hungarian notation everywhere. Ugly code comes from the programmer, not the language.
Storing the type of the variable makes little sense as in most cases it is only a quick grep away.
http://en.wikipedia.org/wiki/Hungarian_notation#Systems_vs._...
Java doesn't have typedefs, and most everyone agrees that's a language bug.