[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

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);
 }
}

A15

B10

C20

D25

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!