I have read here that in Java it is possible for two variables having same name but different type to co-exist in the same scope. What I mean is this
class te
According to the specification of the language (JLS 8.3):
It is a compile-time error for the body of a class declaration to declare two fields with the same name.
The statement that you've quoted is about a class file (i.e. a compiled file, not the source code).