This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 13 is concatenated with that string. The third print statement: System.out.println (8 + 5 + " equals 8 plus 5."); prints 13 equals 8 plus 5. Because: The expression is evaluated left to right since there are no parentheses. The leftmost + has two numeric operands so they are added to get 13. Then the second + has one string operand so the 13 and that string are concatenated. Question 1, part (d): A space should be put inside the quotation marks after the word about and another one before the word years. Click here for a corrected version of the program. Question 2: An example program is in Birds.java...
View Full Document
This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.
- Spring '10
- Computer Science