• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

System.out ?

 
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
System.out is field of PrintWriter or PrintStream ?
System.err is field of PrintWriter or PrintStream ?
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
mark stone
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic