As far as I know, no. But you can use readLine three times, and have an array of lines. I presume you are familiar with the following formats for arrays?Is there something other than readLine that will read the entire file?
OK, I found the basic error..
if (serName = name)
should be
if (serName == name)
Now I working flow issues.
Regards,<br />Ram.<br />SCJP 1.4
or even (in the Thread class description)StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead.
stop()
Deprecated. This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
That makes sense. Thank you for your tip. I am now able to get a little output to the screen, but my if, else statement is not working right yet. However, I am one step closer.
Regards,<br />Ram.<br />SCJP 1.4
That makes sense. Thank you for your tip. I am now able to get a little output to the screen, but my if, else statement is not working right yet. However, I am one step closer.
Regards,<br />Ram.<br />SCJP 1.4
Joanne
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Ok, the book only talks about "if" and "else" so I am not sure what I can put with it to make the statement false.
Joanne
Originally posted by Campbell Ritchie:
[CODE]
There is a much simpler way to do it. All you have to do is work out how to get the System to print out "Eagle not found" if you don't find it, using your boolean variable.
CR
Joanne
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |