Skip to main content
deleted 4 characters in body
Source Link
Jayamohan
  • 13k
  • 2
  • 31
  • 41

It should be

r.append("\n"); 

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independentsystem-dependent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

It should be

r.append("\n"); 

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

It should be

r.append("\n"); 

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you system-dependent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

added 4 characters in body
Source Link
nhahtdh
  • 56.9k
  • 15
  • 131
  • 164

It should be

r.append("\n");

r.append("\n"); 

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator")System.getProperty("line.separator") gives you platform independent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()System.lineSeparator()

It should be

r.append("\n");

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

It should be

r.append("\n"); 

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

added 187 characters in body
Source Link
Jayamohan
  • 13k
  • 2
  • 31
  • 41

It should be

r.append("\n");

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

It should be

r.append("\n");

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independent newline in java.

It should be

r.append("\n");

But I recommend you to do as below,

r.append(System.getProperty("line.separator")); 

System.getProperty("line.separator") gives you platform independent newline in java. Also from Java 7 there's a method that returns the value directly: System.lineSeparator()

Source Link
Jayamohan
  • 13k
  • 2
  • 31
  • 41
Loading