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

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

jQuery Ajax Render Fragments OR Whole Page -

java - Why is BlockingQueue.take() not releasing the thread? -