wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What is the output of printf? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "What is the output of printf?" Watch "What is the output of printf?" New topic
Author

What is the output of printf?

Henry Zhi Lin
Ranch Hand

Joined: Nov 04, 2008
Posts: 69
This is from exam lab,



what is the output of this, and could you explain it?


SCJP 5.0
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18508
    
  40

This is from exam lab,



BTW, what is "exam lab"? Please provide more detail on this source.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Did you try compiling and running it in a small test program? What is the output? Can you explain it yourself? Have a look at the API documentation for the printf() method in java.io.PrintStream for information on how printf() works.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Henry Zhi Lin
Ranch Hand

Joined: Nov 04, 2008
Posts: 69
Originally posted by Henry Wong:



BTW, what is "exam lab"? Please provide more detail on this source.

Henry


This is from the new SCJP simulator which I download from www.examlab.tk
Henry Zhi Lin
Ranch Hand

Joined: Nov 04, 2008
Posts: 69
Originally posted by Jesper Young:
Did you try compiling and running it in a small test program? What is the output? Can you explain it yourself? Have a look at the API documentation for the printf() method in java.io.PrintStream for information on how printf() works.


Sorry, I may just want a quick answer from someone, in fact whenI looked the http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html page, I do understand why and how to get the output.

Thanks for your not so easy answer!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the output of printf?
 
Similar Threads
Format
Please explain the output of this: This question is from ExamLabs Diagnostic Test
examlab diagnostic test question 10
a problem about mock.
Doubt in creating strings...