g) String s = "Five: ” + 3 + 2;
System.out.println(s);
h) String s = “Five: ” + (3 + 2);
System.out.println(s);
Answers
Answered by
1
output:
Five: 32
Five: 5
Mark me as the brainliest plz!!
Answered by
1
Answer:
(g) Five: 32
(h) Five: 5
Explanation:
In a String- valued variable, when used within the parenthesis (), Operator + performs addition.
Five: 5
Otherwise, Operator + performs concatenation (ie., adds two integers as characters).
Five: 32
Similar questions