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 .  Compilation fails
B .  None of these
C .  abc
D .  Compilation clean but no output
E .  xyz
Answer: Option C

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