On Fri, 19 Mar 2004 06:39:35 -0600, "Ryan Stewart"
<zz********@gSPAMo.com> wrote:
"Miguel De Anda" <sodamnmad@_hotmail_.com> wrote in message
news:40******************************@news.terane ws.com... FilexBB wrote:
> Hi Folks,
>
> I have tried to redirect system.out for a while and then set it back,
> but it can't set it back as following program snapshot
>
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> System.setOut(new PrintStream(baos, true));
> System.out.println("hello");
> System.err.println(baos);
> System.setOut(System.out);
> System.out.println("after hello\n");
>
>
> Only display "hello" in system.err and nothing in system .out
>
>
> Regards,
> FilexBB
I had a similar problem:
int so = 0;
int x = 5;
so = x;
so = so;
and after that code... "so" is still 5. :-(
Is this even for real? What in the world would you expect?
Me suspects that he/she was demonstrating why the OP's code wasn't
working in a simpler way.
output = console
output = byteoutputstream
output = output
--
now with more cowbell