Ask Question

Give the type and value of each result of the following Java expressions.

a. (5 / 2) * 2.0

b. (5/2.0) * 2

c. "1.3" + "5.2"

d. 1 + 7.0 + "2" + "x"

+2
Answers (1)
  1. 16 November, 16:17
    0
    Give the type and value of each result of the following Java expressions. a. (5 / 2) * 2.0 type is float value is 4.0 b. (5/2.0) * 2 type is integer value is 5c. "1.3" + "5.2" type is string value is 1.35.2d. 1 + 7.0 + "2" + "x" this will produce an error because we cannot add variables of different type
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Give the type and value of each result of the following Java expressions. a. (5 / 2) * 2.0 b. (5/2.0) * 2 c. "1.3" + "5.2" d. 1 + 7.0 + "2" ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers