Printing to the Console
You can "print" or display messages in the console with the following code:
Line of text:
Prints:
Hello!
Multiple "strings" of text on ONE line:
Prints:
Hello, y'all!
Line of text with a carriage return at the end:
Prints:
Hello!
Multiple "strings" of texts showing the difference between print()
and println()
Prints:
Hello, y'all! I'm happy to see you.
You can also "concatenate" or connect strings with a plus (+
) sign:
Prints:
Hello, y'all! I'm happy to see you.
Last updated