You guys I have a question. I'm trying to write this program, and so far, it's doing mainly what I want it to do, except for one part where I ask the user to input their file name. When they input their file name, (assuming they enter the correct file name), it's supposed to bring up on the screen what's on that file. And so far it DOES do that, BUT, I accidently entered a wrong file name and it brings up everything that is in PetRecords.txt. And I can enter 'any' file name and the info comes up. I know it's something simple to fix this.
And I'm thinking it needs to be fixed around this area:
BufferedReader inputStream = new BufferedReader (new FileReader("PetRecords.txt"));
Take a peek at my code and see what you think.
I swear my code always looks so goofy when I paste it on here. Shoot.
Anyway, I'd appreciate any help or tips you could give me. And remember talk in 'small' talk because I surely don't know the 'big' stuff yet like you guys do.
Oh hey, thank you, thank you, thank you!!! I had actually wrote that line of code and removed the PetRecords.txt and put fileName there, but I didn't move the actual code to a different place. Yeahhhhhhhhhhhhhhhhhhhhh, thank you for giving me a tip.... THANK YOU, THANK YOU, THANK YOU!!! :jumpingjoy