logo

Crowdly

Browser

Add to Chrome

Результат компіляції програмного коду: public class TestMethod {      ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Результат компіляції програмного коду:

public class TestMethod {

     int a;

 

     TestMethod(int i) {

           a = i;

     }

 

     TestMethod method () {

           TestMethod temp = new TestMethod(a * 2);

           return temp;

     }

}

 

public class TestMain {

     public static void main(String []args) {

           TestMethod ob1 = new TestMethod(10);

           TestMethod ob2;

           ob2 = ob1.method ();

           System.out.println(ob1.a);

           System.out.println(ob2.a);

 

           ob2 = ob2.method ();

           System.out.println(ob2.a);

     }

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on virt.ldubgd.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome