Computer Science, asked by daliadas293, 5 months ago

Give the output of the following :

int m=6, n=9;

System.out.println(“M+N=”+m+n);​

Answers

Answered by anindyaadhikari13
5

Question:-

➡Give the output of the following code.

Solution:-

Given code,

int m=6, n=9;

System.out.println(“M+N=”+m+n);

Here, m=6 and n=9

In the print statement, m+n will given output as 69 because m and n are not added, they will be considered as strings.

So,

required output:-

M+N=69

For verification, check out the attachment.

Attachments:
Similar questions