As well, Integer doesn't have a no-argument constructor.
Joined: Mar 19, 2005
Thank you, David and Henry!! After following you guys' instructions, it seems to work. However, there is one problem. For this code, I need to use specific text file and specific command...
What if I want to put the data in this main code istead of putting it in the specific text file so I don't have to use that specific command?
Could you tell me which part I'm supposed to change and how I'm supposed to change? I'm sorry that I'm bothering you too much. Thank you so much.
Joined: Aug 07, 2003
Originally posted by Taylor Woods: What if I want to put the data in this main code istead of putting it in the specific text file so I don't have to use that specific command?
I don't follow. You already have it such that the user can specify the input and output file names. Do you want them hard-coded into the class? If so, just define constants instead of using args and args, but that's probably not what you mean.
And what command? The "java WordTree" command? You could create a batch file called wordtree.bat:
Joined: Mar 19, 2005
But...I don't know exactly how I should declare the String input in this code. And what do you mean by defining constants? Is it what I just asked you about? If so, how do I do it using args and args?
Since I don't quite understand this code, I hope you could show me exactly how the codes should be.
Oh...and last question~ if I'm going to specify the input file and use it to run the program, how do I run it? It seems to compile ok...but it shows this messayge:
WordTree.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Tool completed successfully
and it doesn't run if I use normal way to run this which is:
If I run this using "c:\java\bin\java WordTree", it syas that
Usage: Word Tree inputfile & outputfile
How can I run this program properly?
Thank you so much for your consideration and help, David. I truly appreciate it.
[ March 29, 2005: Message edited by: Taylor Woods ] [ March 29, 2005: Message edited by: Taylor Woods ]