Your error is in the constructor with two integers. In the beginning you made the variables month and year private and in your constructor you try and access them as if they were public. To fix this, either make your variables public or make two methods that return month and year so that you can access them even though they are private. The reason you got a NullPointerException is that when you call hiredate.month it is looking for a public integer named month in the TrialDate class and can't find one. I hope this was helpful.