Computer Science, asked by trisha345697, 1 month ago

FIND THE OUTPUT : (java)

1. system.out.println (5+2+"result="+3+5)
2.system.out.println("value="+3*5)
3. 7+5.0*2+(3.0-1.0)​

Answers

Answered by BrainlyProgrammer
4

Answer:

  1. 7result=35
  2. value=15
  3. 19.0

Explanation:

  • In first one, If your answer is 7result=8 then you are wrong. 5+2 is before string so it will get added, but 3+5 is after string so it will not get added instead it will concatenate it
  • In second one, it will simply multiply as there is * symbol which means multiply
  • Third one follow BEDMAS RULE and remember that double data type has the highest precedence so it will return in double
Attachments:
Similar questions