What is Namespace?

Showing Answers 1 - 8 of 8 Answers

RaviChandra

  • Sep 15th, 2005
 

Namespace is the Logical container Of Different Class.

  Was this answer useful?  Yes

Yashwant S pinge

  • Mar 27th, 2006
 

Namespaces allow to group entities like classes, objects and functions under a name. This way the global scope can be divided in "sub-scopes", each one with its own name.The format of namespaces is:namespace identifier{entities}Where identifier is any valid identifier and entities is the set of classes, objects and functions that are included within the namespace. For example:namespace myNamespace{ int a, b;}In this case, the variables a and b are normal variables declared within a namespace called myNamespace. In order to access these variables from outside the myNamespace namespace we have to use the scope operator ::. For example, to access the previous variables from outside [myNamespace=] we can write:general::ageneral::b

  Was this answer useful?  Yes

It is the logical grouping of various similar classes !!! Why means that all the properties, fields and methos inside namespace are specific to this logical grouping ...


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions