logo

Crowdly

Browser

Add to Chrome

¿Cuál es la salida del siguiente código? class Punto { int x ;   ...

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

¿Cuál es la salida del siguiente código?

class Punto {

int x;

 

Punto(int x) {

this.x = x;

}

 

void mover(int dx) {

x += dx;

}

}

 

public class Test {

public static void main(String[] args) {

Punto p = new Punto(3);

p.mover(2);

System.out.println(p.x);

}

}

 

More questions like this

Want instant access to all verified answers on moodle.elpuig.xeill.net?

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

Browser

Add to Chrome