πŸ“Š JAVA
Q. What is the output of the following code?
Code:
int x = 10;
int y = 20;
int z = x + y;
System.out.println(z);
  • (A) 10
  • (B) 20
  • (C) 30
  • (D) 40
πŸ’¬ Discuss
βœ… Correct Answer: (C) 30

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
258
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Deepak Sahoo
Publisher
πŸ“ˆ
96%
Success Rate