I think we're crossing each other's posts, so I'll just recommend again that you check out the links in my previous post. You aren' using the hasNext() method correctly, so consult the API to see how...
Type: Posts; User: KevinWorkman
I think we're crossing each other's posts, so I'll just recommend again that you check out the links in my previous post. You aren' using the hasNext() method correctly, so consult the API to see how...
I didn't see your last post until after I posted my last Cat example.
Take a look at the Scanner API, specifically the hasNext() method: Scanner (Java Platform SE 6)
Also, this is worth a read:...
That's true, but that doesn't mean you should do anything other than writing to a file from your writeToFile method. Think about it this way: you have a bag of treats, and each treat is either catnip...
Well now you're still comparing your Cat (haha I love that analogy) to another Cat, but the second Cat doesn't exist!
I think you're overthinking your writeToFile() method. Why do you need an if...
I'm not really sure what you mean by PrintWriter method. But judging from your assignment, you aren't supposed to be opening a PrintWriter inside the writeToFile method, you're supposed to pass one...
The instances I'm referring to are the ones you create in main:
PrintWriter outputPlatinumDonor = new PrintWriter("PlatinumDonors.txt");
PrintWriter outputDonor = new...
Have you stepped through this with a debugger, or at least added some print statements to figure out where the failure point is? For example, does your code enter the writeToFile() method? Does it...