answersLogoWhite

0

Java doesn't have a printf method. To provide the implementation of printf method of C in java, the java has two print methods. They are

1. print()
2. println()


The first method prints the text in braces on the same line, while the second is used to print on the next line. In fact, ln in println() stands for next line. We need not use /n while working in java.


Actually, the System.out.format() function is practically identical to printf in C. When translating code from C to Java, you can generally replace all calls to printf(args...) with calls to System.out.format(args...).

...and to answer the original question, Java's System.out.format() method is based off of C's printf() function.

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

JudyJudy
Simplicity is my specialty.
Chat with Judy
BeauBeau
You're doing better than you think!
Chat with Beau
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin

Add your answer:

Earn +20 pts
Q: The Java method printf is based on the?
Write your answer...
Submit
Still have questions?
magnify glass
imp