Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

System.out.println  RSS feed

 
dinesh rajput
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody i am new to this site. i have a problem plz let me know detail regarding "System.out.print" i know only it is used to print at console. can everybody give me detail of its each word like "System" "out" is out a class or a method.
 
Aum Tao
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As System starts with capital s, you could have guessed that it is a class. And, println() , as you know, is a method. As far as out is concerned, i think, it is a package.

 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System is a class.
The System class has a PrintStream object, named out. It is a static variable in System class and so it can be accessed with out creating an object of System class.
println() is a method in the PrintStream class.
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"out" gets initialized when JVM startts....


Shrinivas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!