Answers to Self-Review Exercises
-
jshell> System.out.println("Happy Birthday!"); Happy Birthday! jshell>
-
jshell> System.out.println("Happy Birthday!") Happy Birthday! jshell>
-
jshell> // comments are not executable jshell>
-
jshell> /* opening line of multi-line comment ...> System.out.println("Welcome to Java Programming!") ...> closing line of multi-line comment */ jshell>
25.5 There is no compilation error, because the second /* is considered to be part of the first multi-line comment.
jshell> /* incomplete multi-line comment ...> System.out.println("Welcome to Java Programming!") ...> /* complete multi-line ...> comment */ jshell>
-
jshell> System.out.println("A") A jshell> System.out.println("A") ...
Get Java How To Program, Late Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.