We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Loading...
  • Practice
  • Compete
  • Jobs
  • Leaderboard
  • Hiring developers?
  1. Practice
  2. Java
  3. Introduction
  4. Java Output Formatting
  5. Discussions

Java Output Formatting

  • Problem
  • Submissions
  • Leaderboard
  • Discussions
  • Editorial

    You are viewing a single comment's thread. Return to all comments →

  • nikeshprasad9 2 years ago+ 0 comments

    Printf is supported in java and it is done for formatting the output we print on the screen. Like you use System.out.println it moves the cursor on a new line after printing the statement System.out.print keeps the cursor at the same line after printing the statement Similarly System.out.printf is used to format the output like the one to be done in this question. You can also use System.out.format to format the output. Hope you understand what I want to explain. Do ask again if you didn't :)

    2|
    ParentPermalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature