mary caldwell

Greenhorn
+ Follow
since Oct 16, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mary caldwell

Thank you everyone for the replies. It apparently is creating the text file correctly now (it works when I call my load file method), but I still can't find where it is saving to.... hmm... oh well! At least it works, if mysteriously. Thanks again!
15 years ago
I'm actually on a mac, but I was just trying the quotes out to see if it made a difference (it didn't). My catch block is not catching anything, either (when I run, it prints the "working" from within the try block).
15 years ago
Hello everyone,
I'm having trouble writing data to a text file. The code I have right now compiles and even gives me System.out.println messages that suggest it is working, but it doesn't seem to be actually creating the text file (or at least I can't find it). Any help with this would be awesome. Thanks in advance!

15 years ago
yes, it is located in the same folder as both the .java and .class files for the program.... is there any syntax error i could be overlooking?
15 years ago
The file is located in the same folder as the program... so I should be able to locate it by just specifying the filename, right?
15 years ago
hello,
i'm having trouble getting the syntax right for having a buffered reader access a specific file. i've tried putting this code under my main method:



when i do this, it says "filenotfoundexception". when i try putting the full filepath (/Users/.../HangmanLexicon.txt) it either says the same, or says syntax cannot be resolved.

i've also tried initializing it outside of the main method as:



this gives the same message.

i'm probably missing something very simple, so any help would be much appreciated!
15 years ago
Hello again,
I'm coding a game that has to allow the user to play a certain number of turns before losing. For some reason the game plays perfectly through the first turn, and then skips directly to game over. The weird thing is that I've tried debugging this by sticking in a println call at the end of each turn, and those are working... so it IS running through each turn, but not letting the user play for the 2nd and 3rd turns. If anyone can help by taking a look at the code below, that would be awesome. Thanks a million in advance!

[edit]Add newlines to shorten long lines. CR[/edit]
[ October 21, 2008: Message edited by: Campbell Ritchie ]
15 years ago
thank you so much! the clarification between declaring and initializing helped a lot. cheers!
15 years ago
Hello everyone,
I'm pretty new to java so I would very much appreciate any and all help.

I'm working on a program to play a game where the user needs to be able to move an object on the screen by moving the mouse. I've spent a while trying to figure out why my code is not working... it throws a null pointer exception error. I've posted my code below (leaving out lots of constants)... thanks very much in advance!



[UD: added linebreak to preserve layout ]
[ October 17, 2008: Message edited by: Ulf Dittmer ]
15 years ago