Question: What is the output of the following program? import java util. Scanner; public class Q_10 {public static void main (String[] args) {int ans = 35,

 What is the output of the following program? import java util.

What is the output of the following program? import java util. Scanner; public class Q_10 {public static void main (String[] args) {int ans = 35, x = 50, y = 50; if(x > y){ans = x + 10; x = y;} else{ans = y + 10; y+ = x;} System out println(" x = " +x); System.out.println(" y = " +y); System.out.println(" ans = " + ans);}} What is the output of the following program? public class Q_11 {public static void main(String[] args) {String s1 = " abc"; String s2 = " def"; String s3 = s1; s2 = " xyz"; System.out.println(s1 + " " + s2 + " " + s3);}} What is the output of the following program? public class Q_07{(public static void main(String [] args){int yi1 = 5; String s1 = " 7"; int i2 = 6; System.out.println(i1 + i2 + s1);}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!