What Is Namespace In Apex?
In JAVA, we have got packages. Packages are nothing but folders in which we keep the resource files, class files, and executed files. So, in Salesforce we’ve got Namespace.
In a single namespace, we can have multiple classes with different names, functionalities, and resources. But in the same namespace, we cannot have two classes with the same name.
And every Salesforce Org. has got its own namespace.
How to create a Namespace?
To create a namespace:
- Sign up for a new Developer Edition org.
- In Setup, enter Package Manager in the Quick Find box, and select Package Manager.
- In Developer Settings, click Edit, and under Change Developer Settings, click Continue.
- In Namespace Prefix enter a namespace, and select Check Availability.
- For Package to be managed, select None, then click Review My Selections.
- Review your selections, and then click Save.
Check out this video to learn more about Namespace.
