Ask the user for their name and address. Then, print the information with a top and bottom border. The border should be as long as the name or address line, whichever is longer.
For example (user input in green):Enter your name: Max Schwimmer Enter your address: Wohlwillstrasse 123 **************************** Name: Max Schwimmer Address: Wohlwillstrasse 123 ****************************Another example where the line with the name is longer:
Enter your name: Ludwig van Beethoven Enter your address: Shortstreet 4 ************************** Name: Ludwig van Beethoven Address: Shortstreet 4 **************************
length
method. For example:
int nameLineLength = namePrefix.length() + name.length();
System.out.print
instead of System.out.println
. For example:
System.out.print("*");
System.out.println()
.