Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. int a = 10;
  2. int b = 20;
  3.  
  4. // Tedious string concatenation.
  5. System.out.println("a: " + a + " b: " + b);
  6.  
  7. // Output using string formatting.
  8. System.out.printf("a: %d b: %d\n", a, b);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement