I'm having trouble removing an element from an array of objects. The code I have would be the following:
private Plataforma[] plataformas;
public void eliminarPlataforma(String nombrePlataformaEliminar, int nClientes) {
//Buscar posicion de la plataforma a eliminar
for(int i=0; i<plataformas.length; i++) {
if(plataformas[i].getNombre() == nombrePlataformaEliminar) {
//Eliminar ese elemento
}
}
}
How would that element be removed?
Note that I can't import anything other than java.util.Arrays
.
Thanks in advance.