Basic java coding

Hello guys, i want to find out if there is some way to input a string into a printf function like this:
-Firstly user inputs a string:

string.nextLine();

-Secondly i want to use this printf function like this:

System.out.printf("%.stringf", floatNumber);

As you can see here i want to give a user an opportunity to change amount of digits in float.

Any efforts appreciated🤗

Maybe i’m confused, do you want to get an input from the console and print the float result?

>As you can see here i want to give a user an opportunity to change amount of digits in float.

Read up on 

DoubleFormatter

 >Hello guys, i want to find out if there is some way to input a string into a printf function like this:

I’m assuming this is a question. I suggest:

http://pages.cs.wisc.edu/~hasti/cs368/JavaTutorial/NOTES/JavaIO_Scanner.html