Sail E0 Webinar
Question
What 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";
}
}
Options:
A .  abc
B .  xyz
C .  Compilation fails
D .  Compilation clean but no output
E .  None of these
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers