As Ilja introduced, Windows uses both characters subsequently to display/represent a new line, while UNIX uses just the new line character and Macs use just the carriage return character (if I recall correctly).
Note that
System.getProperty(line.separator) returns a
String that is the sequence of character(s) used to create/display a new line on the operating system in use.