JAVA Programming :: Basic Concepts - Discussion
Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion
62 / 64
What is the Output o the below code:
class Ideone
{
public static void main (String[] args) throws javlang.Exception
{
VariablePass vp = new VariablePass ();
vp.method(5);
}
}
class VariablePass {
int x=20;
public void method (int x) {
x+=x;
System.out.println(x);
}
}
class Ideone
{
public static void main (String[] args) throws javlang.Exception
{
VariablePass vp = new VariablePass ();
vp.method(5);
}
}
class VariablePass {
int x=20;
public void method (int x) {
x+=x;
System.out.println(x);
}
}
A15
B10
C20
D25
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!