ch from nextInt to nextDouble

This commit is contained in:
Orange 2016-11-23 13:03:43 +01:00
parent 74cdd20296
commit 3cff34caff

View File

@ -55,7 +55,7 @@ public class Auto{
if(!sc.hasNext()) return null; if(!sc.hasNext()) return null;
cilindrata=sc.next(); cilindrata=sc.next();
if(!sc.hasNextDouble()) return null; if(!sc.hasNextDouble()) return null;
prezzo=sc.nextInt(); prezzo=sc.nextDouble();
return new Auto(costruttore, modello, colore, cilindrata, prezzo); return new Auto(costruttore, modello, colore, cilindrata, prezzo);
} }