This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

System.out.println()

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one query plz explain me

here
System.out.println();
What is System?
What is out?
What is println()?
thanx
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frankly, this sounds very much like a homework question, so I'm reluctant to give you a straight answer.

What do you know about Java or OOP? Do you know what a class is? A field? A method?

Anyway, moving to Java in General (beginner), where this question really belongs...
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by meraman odedra:
I have one query plz explain me

here
System.out.println();
What is System?
What is out?
What is println()?
thanx



I try to respond but i am a beginner to so anybody could correct me.

Deduction looking javadoc:

System is a java.lang class. From javadoc :
The System class contains several useful class fields and methods. It cannot be instantiated. Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.

out is a static field of the system class, it contains an object PrintStream that rapresent the standard output, wich by default is the console.
From javadoc :
The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.
For simple stand-alone Java applications, a typical way to write a line of output data is:
System.out.println(data)
See the println methods in class PrintStream.

println() is a method of PrintStream class.

So at the end i suggest you to look at java documentation and try to understand all base classes as java.lang package.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marco Vanoli:
...i suggest you to look at java documentation and try to understand all base classes as java.lang package.


Excellent advice!
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems like overkill to me. java.lang contains all sorts of classes. It is not necessary to learn about SecurityManager and ThreadGroup if you just want to understand how to print something.
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rick Portugal:
Seems like overkill to me. java.lang contains all sorts of classes. It is not necessary to learn about SecurityManager and ThreadGroup if you just want to understand how to print something.


Yes, you're probably right about that. I just thought that going to the API documentation for these types of questions is the best approach.
reply
    Bookmark Topic Watch Topic
  • New Topic