I have an abstract class called Client with two subclasses. In the main file (called TestClient) I need to make an array but when I try to start it it gives me the message "Client is abstract; can not be instantiated".
// Arreglo de clientes
Cliente[] arreglo = new Cliente[10];
// Inicializa cada elemento del arreglo de clientes con un objeto de la clase Cliente
int j = 1;
for (int i = 0; i < 10; i++) {
arreglo[i] = new Cliente("Cliente" + (i + 1),i);
}
Mark me that error on the line:
array [i] = new Client ("Client" + (i + 1), i);
Will anyone know how to tell me why?