Monday, 30 March 2015

Empty Classes

It is possible to have a class that has neither data nor code. In other words, it is possible to have empty classes. The declaration of empty classes is as follows:

Class class-name{ };

During the initial stages of development of a project, some of the classes are either not fully identified, or not fully implemented. In such cases, they are implemented as empty classes during the first few implementations of the project. Such empty classes are also called as stubs. The significant usage of empty classes
can be found with exception handling.

No comments:

Post a Comment