I do not know how to solve this error (I think it's because I do not aim well at the position of the array but I do not have much idea how to fix it).
import java.util.*;
public class gestionDesposito {
public static void main(String[] args) {
int tamanio=0;
Deposito[] d=new Deposito[tamanio];
Scanner sc= new Scanner(System.in);
System.out.println("Escriba el numero de despositos a crear entre 4 y 10: ");
tamanio=sc.nextInt();
if(tamanio>=4 && tamanio<=10){
for(int i=0;i<tamanio;i++){
d[i]=new Deposito("0001",10,30);
System.out.println(d[i]);
}
}
sc.close();
}
}