0

Printf?

3rd Jul 2017, 10:59 AM
Great Srrr
Great Srrr - avatar
2 Answers
+ 9
I'm just trying to play a game called "Guess the Question" -_- Yes, you can use printf in Java as follows: int a = 3; System.out.printf("The number is %d", a); And you can print any statement using println() function too. This one is recommended: System.out.println("The number is "+a);
3rd Jul 2017, 12:26 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
thanks
3rd Jul 2017, 12:28 PM
Great Srrr
Great Srrr - avatar