0 votes
in JAVA by

What is the output of the following code?

int x = 10;

int y = 20;

int z = x + y;

System.out.println(z);

a) 10

b) 20

c) 30

d) 40

1 Answer

0 votes
by

Solution: c) 30

Explanation: The values of x and y are added and assigned to z, which is then printed.

Related questions

0 votes
asked Jun 26, 2022 in Django by john ganales
0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986
...