Object Ref Var question 1
Sign in to Google to save your progress. Learn more
Consider the following methods.
public static void  modParams(int x , String s1, String s2)
    {
        x++;
        s1 = s1 + "BB";
        s2 = new String("memory");
     }
           
 public static void print()
           {
               int k=1;
               String s1 = "AA";
               String s2 = "space";
               modParams(k, s1, s2);
               System.out.println(k + " " + s1 + " " + s2);
            }
What is printed when print is called?
Clear selection
Submit
Clear form
This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy

Does this form look suspicious? Report