You are not logged in.
Pages:: 1
#1 2015-06-16 06:03:41
Constructors-And-Methods:
Java Quizzes Java Language Constructors-And-Methods
Directions:
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";
}
}
Question:
What will be the output?
Option A):
abc
Option B):
xyz
Option C):
Compilation clean but no output
Option D):
Compilation fails
Correct Answer is Option A):
abc
You cannot discover the new oceans unless you have the courage to lose the sight of the shore.
Offline
2015-06-16 06:03:41
- Advertisement
- Ads By Google
Re: Constructors-And-Methods:
\n
Pages:: 1