System.out.println('A'+10+'B')
Answers
Answered by
3
System.out.println("A"+10+"B")
A10B
In the println method, given first is a string. The string, if added to a number, gets concatenated.
System.out.println(5 + 3 + 7)
System.out.println(5 + 3 + "B")
15
8B
==> It gets added by order. Number added to number gives away sum(5 + 3). Number added to string gets concatenated(8 + "B")
I hope that you understand.
I hope that my answer helps you...
Mark this answer as brαinliest ;)
Similar questions