CJCoding With Joseph
15per day

String Alignment

Create three string variables with the names "Alice", "Bob", and "Charlie".
Print them so that:

• The first is left aligned in a 10-character wide space
• The second is right aligned in a 10-character wide space
• The third is left aligned in a 10-character wide space

Expected Output:

|Alice     |
|       Bob|
|Charlie   |

Expected Output:

|Alice     |
|       Bob|
|Charlie   |
Topics:
Printing
Code Editor
1
Tab to indent · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.