Home > Topic List > How to read carriage return in java

How to read carriage return in java

In Java, a carriage return is usually represented by a newline character. "\r\n" is used in Windows systems to represent carriage return and line feed, while "\n" is used in Unix/Linux systems. When reading text that contains carriage returns, Java treats these characters as normal characters. You can use the BufferedReader or Scanner classes to read text from the input stream until a carriage return or line feed is encountered.

Related courses More >
ElementaryPHP basics to practice (PHP+MySQL)

25970 times of learning

Collection
AdvancedIssue 4_Framework Development

14493 times of learning

Collection
ElementaryIssue Six_Front-End Basics

20129 times of learning

Collection
Related Tutorials More >
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!