This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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....