I feel a bit stupid about this, but I haven't figured out how to printed a formatted number to the console in
Java. I was hoping for a "printf" or something like it. Here is a sample of what I'd like to do:
which prints out an accurate but useless table of numbers with 15 digits of accuracy. How can I make it print out only one or two digits?
Thanks in advance.