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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -