Re: How do I make this work?
Who? Note that your message is going to a public
forum, any comment to a usenet newsgroup is
effectively addressed to 'everybody' that reads it.
....O miracle, it works....
Code generally works (or breaks) according to well
known specifications, as opposed to the whims of
Gods, or influence of other magics.
Not when I place the code in class: Solution_1.java and call
this code from class: Use_solution_1.java (as you can see
both are in the same package). Do you know how I make this work?
Well.. I cannot speak for Zefria, but I saw this output
after a number of changes to the code shown...
Requested file was not found!
Did you have a specific question beyond that?
A question you might like to address to 'everyone
who cares to read or reply'?
What exact compilation errors are you getting?
What do you suspect are the cause of those errors?
Where did you try researching it further (books, links
In the meantime - couple of notes,
Using Strings to represent a file name is very fragile,
I feel that the only parameters for file or URL based
resources should be File or URI objects, so I would
suggest changing the method 'FileReadingMethod'
to accept a File or URI, rather than a String.
The convention for method names would make that
..with a lower case first letter.
To build up the file itself, it is better to use the
File(File, String) constructor in a loop to gain a
subdirectory for the actual file required. Using that
constructor, the correct separator will be automatically
be used for Windows, *nix or Mac.
For getting to a system 'temp' style directory,
there are system properties available that point
directly there (to a TEMP dir appropriate to the
Message posted via JavaKB.com