what I'm trying to do is make a string left justified and make a double right justified.
Please copy and post the output here and wrap it in code tags:
[code=java]
YOUR OUTPUT GOES HERE
[/code]
to get highlighting and preserve formatting.
System.out.printf ("|%-1s| |%2f|\n", "example 1", 1.2);
//|example 1| |1.200000|
The width's are too small to show adjustment. Enlarge them:
System.out.printf ("|%-20s| |%20f|\n", "example 1", 1.2);
// |example 1 | | 1.200000|
Above the String is left adjusted and the number is right adjusted.