logo

Crowdly

Dado el siguiente código en Java:   public class Punto3DArray { private...

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

Dado el siguiente código en Java:

 

public class Punto3DArray {

private double[] coords; // coordenadas x, y, z

public Punto3DArray (double[] coords) {

this.coords = coords;

}

public String toString () {

return "(" + coords[0] + ", " + coords[1] + ", " + coords[2] + ")";

}

public static void main (String[] args)

{

double[] coords = {2,3,4};

Punto3DArray p = new Punto3DArray(coords);

coords[2] = 5;

System.out.println(p);

}

}

Indica lo que se mostrará en la salida estándar cuando se ejecute.

More questions like this

Want instant access to all verified answers on moodle.upm.es?

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