To print a line of text in Java, you can use the System.out.println()
statement.
β Example:
π Explanation:
-
System
: A built-in class in Java. -
out
: A static member ofSystem
, representing the output stream. -
println()
: A method used to print text with a newline at the end.
π Output: