PrintStream problem

Bryce McKinlay bryce@albatross.co.nz
Sun Apr 18 20:34:00 GMT 1999


Since Per checked in his recent PrintStream/unicode converter changes,
I've noticed that System.out.println is appending an extra newline to
each line written (this is on linux/glibc 2.0.7) :
public class PrintTest {
 public static void main(String args[]) {
 System.out.print("this works fine");
 System.out.print(System.getProperty("line.separator"));
 System.out.println("but this prints two newlines");
 System.out.println("see?");
 }
}
[bryce@reason tests]$ java PrintTest
this works fine
but this prints two newlines
see?
[bryce@reason tests]$ gcj PrintTest.java -o printtest --main=PrintTest
[bryce@reason tests]$ ./printtest
this works fine
but this prints two newlines
see?
[bryce@reason tests]$
regards
 [ bryce ]


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /