0
Java println & printf
actually why java got two type of print which is println & printf both of them are same?
2 Answers
+ 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'