belongs to collection: Java exercises
What does this program print?
public class Test { public static void main(String[] args) { System.out.println("39 + 3"); System.out.println(39 + 3); } }
(Java interprets the statement "39 + 3" as a string and thus prints out the literal characters 39 + 3. Java interprets the second statement 39 + 3 as an operation between two numbers, so it first calculates the value 39 + 3 = 42 then prints out the result 42.)
the output is :
39 + 3 42
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
(Java interprets the statement "39 + 3" as a string and thus prints out the literal characters 39 + 3. Java interprets the second statement 39 + 3 as an operation between two numbers, so it first calculates the value 39 + 3 = 42 then prints out the result 42.)
the output is :
need an explanation for this answer? contact us directly to get an explanation for this answer