android - String.Format (.NET) equivalent in Java? -


the string.format in .net (maybe vb.net) convert {0}, {1}, ... determined string, example:

dim st string = "test: {0}, {1}" console.writeline(string.format(st, "text1", "text2")) 

i've tried search in both google , stackoverflows, return number-string format.

the other suggestions good, more in style of printf , lineage more recent additions java. code posted looks inspired messageformat.

string format = "test: {0}, {1}" system.out.println(messageformat.format(format, "text1", "text2")) 

i'm not 'return: statement doing though.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -