
-----------------------------------
javanoob
Fri May 30, 2008 3:04 pm

NullPointerException Error
-----------------------------------
As you can see from my name, I am a Java noob, so bear with me.  I made a program for my grade 12 comp sci class using classes.  I have a "worker" class, "employee" class, and my driver.  The driver is the problem.  The program allows the user to create a "worker", or an "employee", and once those are created, it allows them to look up created people.  So, here is the problem.  


	System.out.println("Would you like to display a worker or employee?");
	System.out.println("Type 'w' for worker, 'e' for employee, or 'n'to skip.");
	String input = myInput.readLine();
	answer = input;

        while (!answer.equalsIgnoreCase("n"))
	{
		if (answer.equalsIgnoreCase("w"))
		{
			System.out.println("Which worker would you like to display?");
			input = myInput.readLine();
			String query = input;

			for (int j = 0 ; j