Results 1 to 2 of 2
Thread: What are these values in printf
- 04-19-2012, 06:41 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 6
- Rep Power
- 0
What are these values in printf
I'm looking at some java code and I was wondering what these values are and what changing them will do. I'm referring to the "%14d" and "\n%5s". I looked at the API but I couldn't find much on these specific values. Could someone please describe them to me or point me to more information about it?
Thanks!
Java Code:System.out.printf("\n%5s", voterID); System.out.printf("%14d", MEAN); System.out.printf("%14d", MEDIAN); System.out.printf("%14d", MODE); System.out.printf("%14d", MIN); System.out.printf("%14d", MAX); System.out.printf("%14d", Favorable); System.out.printf("%14d", UnFavorable);
- 04-19-2012, 06:47 AM #2
Senior Member
- Join Date
- Apr 2012
- Posts
- 211
- Rep Power
- 0
Re: What are these values in printf
Are you looking at the Format String Syntax in Formatter (Java Platform SE 6).
%14d would mean output a decimal integer data type with a width (=minimum number of characters) of 14.
Similar Threads
-
printf VS printWriter.printf
By Mapisto in forum New To JavaReplies: 14Last Post: 01-20-2012, 01:29 PM -
printf
By razzle in forum New To JavaReplies: 4Last Post: 11-12-2010, 03:13 PM -
Printf problem!!!
By pinar in forum New To JavaReplies: 3Last Post: 11-06-2010, 10:44 PM -
Printf error
By ks1615 in forum New To JavaReplies: 4Last Post: 03-10-2009, 07:59 AM -
printf
By Jack in forum New To JavaReplies: 2Last Post: 07-04-2007, 05:31 AM
Bookmarks