Mansi Agarwal wrote:Is this the whole statement? I mean it is not closing so is there something else that goes with it?
Oops sorry! That was my copy and paste mishap.. I've updated it now.
Don Redd wrote:the second and third arguments to printf are considered as plain strings and the first argument (12%1$s) contains the formatting code in which %1$s -----> is replaced by first argument which is of type String "13%1$s" and the output is:
1213%1$s
IF you had this (12%2$s) in first argument , the output is :1214%1$s
hope you got it
Ah! I get it now! Thanks so much