Results 1 to 3 of 3
  1. #1
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Please explain this System.out.println() code

    Please I know a little bit of Java basic like constructor, variables, static, methods, interface etc... but I'm wondering how can I create a code like this: System.out.println()..
    Lets disect the code:
    Java Code:
    System.out.println()
    I am correct with my analysis: System is a class
    out. is a static variable
    println is a method..

    am I correct?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Please explain this System.out.println() code

    Quote Originally Posted by RichersooN View Post
    Please I know a little bit of Java basic like constructor, variables, static, methods, interface etc... but I'm wondering how can I create a code like this: System.out.println()..
    Lets disect the code:
    Java Code:
    System.out.println()
    I am correct with my analysis: System is a class
    out. is a static variable
    println is a method..

    am I correct?
    Yes. Even more important though is have you checked the API for the System class? It will tell you exactly what kind of variable out is, and this will tell you why it has methods such as print, println, printf, etc...

  3. #3
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Re: Please explain this System.out.println() code

    ok thanks now i finally understand it. out is actually object of printstream.

Similar Threads

  1. Replies: 8
    Last Post: 06-21-2011, 03:21 PM
  2. System.out.println(040|343);
    By satheshshiva in forum New To Java
    Replies: 5
    Last Post: 06-26-2010, 11:26 PM
  3. Println VS system.out.println
    By ccie007 in forum New To Java
    Replies: 2
    Last Post: 05-20-2010, 09:52 AM
  4. difference between system.out.println() & out.println()
    By wickedrahul9 in forum Advanced Java
    Replies: 5
    Last Post: 10-19-2008, 12:06 AM
  5. Help me with system.out.println
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 09:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •