Single Choice Not Set

QWhat will be the output?
public class Test{
      public static void main(String[] args){
            String value = "abc";
            changeValue(value);
            System.out.println(value);
      }

      public static void changeValue(String a){
            a = "xyz";
      }
}

ID: #2116 Declaration and Access Control in Java 1,394 views
Question Info
#2116Q ID
Not SetDifficulty
Declaration and Access Control in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A abc
  • B xyz
  • C Compilation fails
  • D Compilation clean but no output
Correct Answer

Explanation

abc

Share This Question

Challenge a friend or share with your study group.