I'm teaching myself about inner classes and am just practicing some code to test what I've learnt. Unfortunately I have got stuck instantiating a object, the following is my code. Would be grateful if anyone could assist me:
I get the error on the line where im trying to create a object. Thanks
Your Student inner class is not static. Therefore, as all other non-static members (fields, methods), you will need an instance of the enclosing class first: