Developer community
0 votes
11 views
asked by Guru (27.1k points) 31 48 96 | 11 views

1 Answer

0 votes
The following table shows the format specifiers:

Format Specifier    Conversion Applied
%a %A                 Floating-point hexadecimal
%b %B                 Boolean
%c                        Character
%d                         Decimal integer
%h %H                Hash code of the argument
%e %E                Scientific notation
%f                         Decimal floating-point
%g %G                Uses %e or %f, whichever is shorter
%o                         Octal integer
%n                         Inserts a newline character
%s %S                  String
%t %T                      Time and date
%x %X                      Integer hexadecimal
%%                          Inserts a % sign

If the argument doesn't match the type-checks, an IllegalFormatException is thrown.
answered by Expert (15k points) 15 23 29

Related questions

0 votes
1 answer
asked by john Guru (27.1k points) 31 48 96 | 47 views
0 votes
1 answer
asked by john Guru (27.1k points) 31 48 96 | 18 views
0 votes
1 answer
0 votes
1 answer
asked by taye Sr Member (5k points) 7 9 12 | 53 views
0 votes
1 answer
asked by felin Advisor (8.4k points) 10 15 18 | 25 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users