-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.0.1
-
sparc
-
solaris_2.5
From: ###@###.###
This does not look like form output to me.
I found a bug in the JDK 1.0 under Windows 95:
/* This Java application demonstrates a bug in the "standard I/O
* routines" provided by System.in.read and System.out.println. If
* System.in.read encounters an EOF character (CTRL-Z on PC's),
* and you call System.out.println immediately afterwards,
* System.out.println doesn't print the first line it is given.
* (Note, however, that if the first println call after read()
* has more than one line (using "\\n"), then only the first line in
* the argument doesn't print.)
*/
class SysErr {
public static void main(String args[])
throws java.io.IOException
{
System.out.println("Type anything you want. If you use " +
"the EOF character,");
System.out.println("Only one line will appear below.");
System.in.read();
System.out.println("Line 1"); // this doesn't appear !
System.out.println("Line 2");
}
}
--------------------------------------
Oren Hurvitz
E-mail: ###@###.###
(Include "oren" on the subject line to make sure I receive the email)
--------------------------------------
This does not look like form output to me.
I found a bug in the JDK 1.0 under Windows 95:
/* This Java application demonstrates a bug in the "standard I/O
* routines" provided by System.in.read and System.out.println. If
* System.in.read encounters an EOF character (CTRL-Z on PC's),
* and you call System.out.println immediately afterwards,
* System.out.println doesn't print the first line it is given.
* (Note, however, that if the first println call after read()
* has more than one line (using "\\n"), then only the first line in
* the argument doesn't print.)
*/
class SysErr {
public static void main(String args[])
throws java.io.IOException
{
System.out.println("Type anything you want. If you use " +
"the EOF character,");
System.out.println("Only one line will appear below.");
System.in.read();
System.out.println("Line 1"); // this doesn't appear !
System.out.println("Line 2");
}
}
--------------------------------------
Oren Hurvitz
E-mail: ###@###.###
(Include "oren" on the subject line to make sure I receive the email)
--------------------------------------