hi how can i concatenate and removove blank space between two lines of data in a text file and also how can i append at the bottom, not overwrite the existing data?
i have a [mes] part where the data is continued with a blank space, how can i display it in ony 1 straight line, using the System.out.println?
[tim]July 10 1999 at 19:04:30
[mes]Sample message broken
Message to concat on first message
[end]
here is my code:
input = new BufferedReader( new FileReader(aFile) );
String line = null; //not declared within while loop
while (( line = input.readLine()) != null){
System.out.println(line);
i have a [mes] part where the data is continued with a blank space, how can i display it in ony 1 straight line, using the System.out.println?
[tim]July 10 1999 at 19:04:30
[mes]Sample message broken
Message to concat on first message
[end]
here is my code:
input = new BufferedReader( new FileReader(aFile) );
String line = null; //not declared within while loop
while (( line = input.readLine()) != null){
System.out.println(line);