Hello. I am trying to figure out a way to have a user choose how many places of precision they want to be printed out of a number(a double), but I am having some trouble figuring out how to do this. I know you can use DecimalFormat or printf to choose how many places of precision to print out, but what I can't figure out is how to take user input and apply it to one of those methods. I was thinking of passing a variable(containing the user input) as an argument to the DecimalFormat object but that doesn't seem to work, so I'm curious how anyone else would do it. I already asked my teacher and he says he is unsure of how to do this in Java(this is the first time he's teaching this class in Java, as opposed to Pascal) and he says to just not do that part, but I would still like to know how to do it if anyone would be kind enough to enlighten me. I am a bit of a Java(and programming in general) newbie, I've taken an intro to programming using Java course, so i only have a couple of months of experience with Java and just can't seem to find a way to do this with what I've learned. Any help would be greatly appreciated!