HomeBookAccepting a method in java pdf