java - How do I escape the ',' character in System.out.format? -


i want output 2 numbers separated comma using system.out.format. tried escape %, didn't help.

target output should in form of (0.92,0.91)

system.out.format("(%.2f% %.2f)%n", x, fx);                          ^--- want add ',' character here 

you don't have escape comma in format. place comma in format, without percent sign next it.

system.out.format("(%.2f,%.2f)%n", x, fx); 

Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -