This section provides you an example of with program code which reads the string or text of a text file which is mentioned by the user and replacing all the new line character by the double quote with one space (" ") wherever it found. When the program shows the string as output in the console, you will understand where the new line character was lying because of representing all the double quote with the single space symbol where the new line character was present in the string or text in the file.
Here is the code of the program:
import java.util.regex.*;
|
|
Recommend the tutorial |
Ask Questions? Discuss: Removing Line Termination Characters from a String
Post your Comment