java - Interpolation Simulation (String Formating) -



java - Interpolation Simulation (String Formating) -

here's example:

int n1 = 20; int n2 = 40; string output = string.format("some guy **%d** years old while other **%d** ", n1, n2); system.out.println(output);

why not work?

i find works when i'm testing, , print belows:

guy 20 years old while other 40

java format

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -