This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "What are NameSpaces" Watch "What are NameSpaces" New topic
Author

What are NameSpaces

sanjeev kb
Greenhorn

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

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.
ex:
java.util.Date
java.sql.Date


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What are NameSpaces
 
Similar Threads
what is the difference between <s,<mx,<fx tabs
What are namespaces?
Hierarchical spring contexts
DTD
why no matches past the "/" and no output?