| 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: 16687
|
|
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
Bartender
Joined: Aug 16, 2005
Posts: 12911
|
|
|
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!
|
 |
 |
|
|
subject: What is the output of printf?
|
|
|