0

Java println & printf

actually why java got two type of print which is println & printf both of them are same?

31st May 2019, 6:31 AM
Tzion
Tzion - avatar
2 Réponses
+ 2
Println is used to display a line without formatting. Printf is used to display a formatted output : int a = 6 ; System.out.printf("integer a is %d", a); //will output 'integer a is 6'
31st May 2019, 7:51 AM
Théophile
Théophile - avatar