Previous Topic Next topic Print topic


Namespaces - in COBOL and Java

Namespaces in Managed COBOL

Namespaces can be set at the file level.

$set ilnamespace "Harding.Compsci.Graphics"
*> The directive can also be set at the project level 
*> to apply the name space to all classes in the project.

Namespaces in Java

// Packages are used to organize files or public types to avoid 
// type conflicts. 
// Package constructs can be mapped to a file system.
package Harding.Compsci.Graphics 
  ...
  
// package cannot be nested

Portions of these examples were produced by Dr. Frank McCown, Harding University Computer Science Dept, and are licensed under a Creative Commons License.

Previous Topic Next topic Print topic