Results 1 to 2 of 2
  1. #1
    darek9576 is offline Member
    Join Date
    Mar 2010
    Rep Power

    Default printf() method explanation needed

    Could anyone give some info on the printf() method..
    I know we can put %d and %s in the format argument so that it takes a string data type
    and a decimal data type but apart from that are there any other uses of printf()?

    some simple examples will do the job i guess..

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    Please have a look at this link as it should explain most if not all of what you need to know:

    Formatting (The Java™ Tutorials > Essential Classes > Basic I/O)

    Look at the second half of the tutorial, the one that goes through System.out.format(...) as I believe that it's the same thing as printf. If anything is confusing, please come back with any questions you may have. Best of luck!

Similar Threads

  1. Get/Set Method help needed
    By goingInsane in forum New To Java
    Replies: 1
    Last Post: 12-08-2009, 07:03 PM
  2. Recursive method using int array, help needed
    By chupalo17 in forum New To Java
    Replies: 4
    Last Post: 09-07-2009, 11:15 PM
  3. Demonstration of printf() method
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 07:37 PM
  4. Replies: 0
    Last Post: 11-10-2007, 04:47 PM
  5. printf
    By Jack in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 04:31 AM

Posting Permissions

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