Question: public static int foo(int a, Strings) { s=Yellow; a=a+2; return a; } public static void bar() { int a=2; String s= Blue; a =
public static int foo(int a, Strings) { s="Yellow"; a=a+2; return a; } public static void bar() { int a=2; String s= "Blue"; a = foo(a,s); System.out.println("a="+a+" s=" +s); } public static void main(String args[]) { bar(); } What is printed on execution of these methods? Da=4s = Blue Da = 5 s = Yellow a=3s = Yellow a=25s = Blue
Step by Step Solution
There are 3 Steps involved in it
The image shows a code snippet written in Java and a multiplechoice question related to the output o... View full answer
Get step-by-step solutions from verified subject matter experts
