Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 4:{
- if(cont>0){
- int c = cont-1;
- System.out.println("Posizione della lampada da eliminare(Da 0 a " + c + "): " );
- int del = tastiera.nextInt();
- if(del>=0 && del<dim){
- if(cont==1){
- array[del] = new lampa();
- }
- else{
- array[del] = new lampa(array[c]);
- array[c] = new lampa();
- }
- System.out.println("Eliminata!");
- cont--;
- }
- else
- System.out.println("Numero non valido!");
- }
- else
- System.out.println("Magazzino Vuoto!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement