Languages
[Edit]
EN

Java - split string by new line character

6 points
Created by:
Inferio
328

1. Overview

Edit

2. Java split string by new line - \n

Edit

Code example: 

Output:

3. Java split string by regex - \\r?\\n - support for most important platforms Windows, Unix, Linux MacOS

Edit

Code example with explanation in comment:

Output:

 

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Java - String (popular problems)

Java - how to split string by new line character?
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join