Thread: output
View Single Post
  #4 (permalink)  
Old 12-01-2007, 11:34 PM
staykovmarin staykovmarin is offline
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Sorry i misread.
extra note:

from hardwired:
Code:
if(!strs[j].trim().equals("")) pw.println(strs[j]);
if you add the trim(), you are making sure that if the string array has a space element (so " ") it will not be put in the file.

Also, String.length() yields better performance.
Reply With Quote