Solution: Personalize Your Java Output

This solution uses Strings, + (concatenation), and escape characters to print a message on two lines with quotes.

What the code does

  • Stores text in String variables (name, activity)

  • Combines text + variables using +

  • Uses:

    • \n to print on a new line

    • \" to print quotes inside a string

Solution: Personalize Your Java Output

This solution uses Strings, + (concatenation), and escape characters to print a message on two lines with quotes.

What the code does

  • Stores text in String variables (name, activity)

  • Combines text + variables using +

  • Uses:

    • \n to print on a new line

    • \" to print quotes inside a string