I have a menu in the program should look like this:
1. Add task: n -t 2. View all tasks: v 3. Add comment: n -c And so on...
I did this:
System.out.printf("%-40s%-1s%n","1. Add task:","n -t"); System.out.printf("%-30s%-1s%n","2. View all tasks:","v"); System.out.printf("%-40s%-1s%n","3. Add comment:","n -c"); It turns out not that the indent from the first word is the same ... And the menu is still crooked ...
How to do it correctly so that it is exactly like in the first example?