All pastes #728733 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-07 09:33 UTC
rendered paste body
Exception in thread "main" java.lang.NullPointerException
   at vetoffice.Owner.addDog(Owner.java:46)
   at vetoffice.Runner.main(Runner.java:19)


//snippet from owner.java
	public void addDog(Dog dog)
	{
		Dog d = new Dog("name", true);
		pets.add(d);
	}

//info from runner.java
		//create the dog
		Dog sparky = new Dog("Sparky", false);
		Dog rascal = new Dog("Rascal", true);
		//create the owner
		
		Owner travis = new Owner("Travis");
		Owner david = new Owner("David");
		
		travis.addDog(rascal);