Anna , can you please tell me , in the following code , How the Output is obtained as 2 .. public class Question { public static int x=7; public static void main(String arg[]) { Question a = new Question(); Question b = new Question(); a.x=3; b.x=2; System.out.println(a.x-b.x+Question.x); } }
Mass bro nee
❣️💯
Algorithm series podunga bro
Bro springboot full video podunga bro
Bro merge sort algorithm video podunga bro
Anna , can you please tell me , in the following code , How the Output is obtained as 2 ..
public class Question
{
public static int x=7;
public static void main(String arg[])
{
Question a = new Question();
Question b = new Question();
a.x=3;
b.x=2;
System.out.println(a.x-b.x+Question.x);
}
}
X value is updated to 2.
2-2+2=2(Ans)