✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
¿Qué imprime?
class A {
int valor = 5;
void cambiar(A otro) {
otro.valor = 10;
}
}
public class Test {
public static void main(String[] args) {
A obj = new A();
obj.cambiar(obj);
System.out.println(obj.valor);
}
}