wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes System.out ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "System.out ?" Watch "System.out ?" New topic
Author

System.out ?

mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
System.out is field of PrintWriter or PrintStream ?
System.err is field of PrintWriter or PrintStream ?
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
System.out IS a PrintStream.
http://java.sun.com/j2se/1.3/docs/api/index.html
So is error.
PrintWriter is similar to a PrintStream but I was mistaken earlier; System.out and System.err are PrintStream objects.
Rob


Rob
SCJP 1.4
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Originally posted by mark stone:
System.out is field of PrintWriter or PrintStream ?
System.err is field of PrintWriter or PrintStream ?

System.out and System.err are neither a field of PrintWriter nor PrintStream classes.
A field means a member.
But I think what you wanted to ask is of which type both are? Right? Then System.out and System.err are of type PrintStream.
Be careful about the wording mark !!
HIH


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
out and in are fields of class System. right ?
and we refer to them as System.out and System.in
right ? these are fields.
let me know where i am wrong
Originally posted by Valentin Crettaz:

System.out and System.err are neither a field of PrintWriter nor PrintStream classes.
A field means a member.
But I think what you wanted to ask is of which type both are? Right? Then System.out and System.err are of type PrintStream.
Be careful about the wording mark !!
HIH
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Originally posted by mark stone:
System.out is field of PrintWriter or PrintStream ?
System.err is field of PrintWriter or PrintStream ?
System.out is a field of class System. System.out is a PrintStream. System.out is not a field of PrintStream. Same with System.err

PrintWriter is not involved with System.out at all.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.out ?