I assume your question is really "Why can we use the names of classes as names of variables?"
The answer to that is, the Java Language Specification doesn't forbid it. And really it can't, because people can create classes with any names they liked. Imagine if just creating a class named "Unit" caused some code you wrote two years ago to fail to compile because you named a variable "Unit".
Joined: Sep 20, 2008
I cant Get You...Please Explain Me Very Clearly....How The Code Works....