File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes What are NameSpaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "What are NameSpaces" Watch "What are NameSpaces" New topic

What are NameSpaces

sanjeev kb

Joined: Jul 19, 2001
Posts: 1
Hi All,
Please give me brief definition and explanation of namespaces
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
It is an area where the name of a class or variable is not obscure (can not be mistaken for another one with the SAME name).
In java, class namespaces are packages. You can not have two classes with the SAME name in the same package. You CAN have two packages with the same name in different packages because they are in different namespaces.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: What are NameSpaces
It's not a secret anymore!