I want to create my own custom function in Java which work exactly same like the printf
in C.
Like
printf("My name is %c, my age is %d", "B", 23);
Which will print My name is B, my age is 23
or
printf("No of items %d", 2);
which will print No of items 2
.