Above code will result in nullpointerexception when an object to StudentGrades is created as you are trying to access the length of grades before initialization.
Type: Posts; User: dineshj83
Above code will result in nullpointerexception when an object to StudentGrades is created as you are trying to access the length of grades before initialization.