Sample Solution from
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Chapter 1
Problem 1STE
Try another sample solution
Textbook Problem

If the following statement were used in a Java program, it would cause something to be written to the screen. What would it cause to be written to the screen?

System .out .println "Java is not a drink ." ;

Expert Solution
Program Plan Intro

Given:

A statement,‘System.out.println(“Java is not a drink”);’.

To find:

The output of the statement,‘System.out.println(“Java is not a drink”);’.

Explanation of Solution

Solution:

The statement,‘System.out.println(“Java is not a drink”);’, written in Java language will display the output as “Java is not a drink”.
As Java is an OOP language, there is a separate syntaxfor displaying something on the screen.
‘System.out.println’ is used for this purpose in the Java programming language.
Not sold yet?Try another sample solution