This kind of declaration is used to help the compiler to understand what string used into the code are sintax errors or objects that are somewhere defined. I'll try to find a way to explain this to you with two examples,... and remember that the compiler will read the code in the same way of you, i.e. from top to bottom: First case: the error! class classA{ classB b; //The compiler tells: _What is **classB**? I don't know this.:(... => Error_ } class classB{ //Compiler interrupted:(, this isn't readed! ... } Second case: OK class classB; //You are telling to the compiler: _wait a moment, the definition of this class will came later_ class classA{ classB b; //The compiler tells: _What is **classB**? I don't know **how it is build**, but I know that it **exist** and it isn't a sintax error. So I can continue!_ } //The compiler tells: _Yahoooo:-D, now I will know what **classB** is!!_ class classB{ ... } Hope be clear