Can anybody tell me the difference between printf() and println()? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anybody tell me the difference between printf() and println()?

22nd Mar 2016, 6:07 PM
harshad sonu
harshad sonu - avatar
2 Answers
+ 3
in printf() you can put data specifiers.. for ex. string name="rob"; printf("hello %s", name); in println() you cannot put data specifiers. to achieve what we did above we can do the following: for ex.. String name="rob"; System.out.println("hello " + name); I hope you understood..
1st Apr 2016, 12:52 PM
Febin Varughese
Febin Varughese - avatar
0
read the intro again
27th Aug 2016, 12:25 PM
Jaden Hepburn
Jaden Hepburn - avatar