You can use System.out.printf() as follows if you want a good format
System.out.printf("%-20s %s\n", Name, Income);
Print as:
Jaden 100000.0 Angela 70000.0 Bob 10000.0
This format means:
%-20s -> this is the first argument, Name, left justified and padded to 20 spaces. %s -> this is the second argument, Income, if income is a decimal swap with %f \n -> new line character
You can also add formatting to the Income argument so that the number is printed as desired.
Check it out for quick reference.
source share