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?
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”);’.
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.