In this article, we will see how to use format method of String and place arguments within string in Java.
Lets look to our code.
String.Format(".... %1$s ... %2$s","andromeda");
Lets see it in an example.
In above example, we used arg parameter in a string and print it to terminal. Output indicates that string as arg is replaced within our string .