Which of the following best describes the function of System.out.println() in Java?
🌟 Quick Verification
- Direct Answer: The correct answer is It is used to print an argument passed to it to the standard output.
🧠 Concept Blueprint
- Mechanism:
Systemis a built-in class,outis a static member of that class representing the standard output stream, andprintln()is the method that prints the passed argument followed by a new line.
📊 Fact Spotlight
| Method | Purpose |
|---|---|
| print() | Prints argument, cursor stays on the same line. |
| println() | Prints argument, cursor moves to the next line. |