From a8e5494aa04593555cd6bb106b4bd2d6fd025224 Mon Sep 17 00:00:00 2001 From: Orange_Dugongo Date: Fri, 21 Oct 2016 14:41:53 +0200 Subject: [PATCH] Fix and delate nextLine() --- src/Studenti-Esami/Esame.class | Bin 963 -> 955 bytes src/Studenti-Esami/Esame.java | 4 ++-- src/Studenti-Esami/Main.class | Bin 1862 -> 1764 bytes src/Studenti-Esami/Main.java | 7 ++++--- src/Studenti-Esami/Studente.class | Bin 1137 -> 1129 bytes src/Studenti-Esami/Studente.java | 8 ++++---- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Studenti-Esami/Esame.class b/src/Studenti-Esami/Esame.class index 531c3b63003cb7bd7fa35e8d6c3723d906f38b75..31c613bd4d5110ceee0517e2b4267a291b8af02d 100644 GIT binary patch delta 34 ocmX@izMFl+Sw>OzjKpHU)QS>D24)S-C`JaBJRoQDE5@6Q0Kgdv?EnA( delta 42 scmdnZewcm3Sw>mzjKpHU)QS?H%)C@a24)S-C`Ja3JgC6tM~pWa0W4e&1poj5 diff --git a/src/Studenti-Esami/Esame.java b/src/Studenti-Esami/Esame.java index bd8e522..f25a3b0 100644 --- a/src/Studenti-Esami/Esame.java +++ b/src/Studenti-Esami/Esame.java @@ -30,8 +30,8 @@ public class Esame{ String nome; int voto; int mat; - if(sc.hasNextLine()){ - nome=sc.nextLine(); + if(sc.hasNext()){ + nome=sc.next(); if(sc.hasNextInt()){ voto=sc.nextInt(); if(sc.hasNextInt()){ diff --git a/src/Studenti-Esami/Main.class b/src/Studenti-Esami/Main.class index 830514fbf6bb4a5fc3378246c2343c808c8185c7..e58ab62faae076514219902e66dbb79b3b83833a 100644 GIT binary patch delta 875 zcmY*XOHb5L7(I9B^p;YQK~Ty=iipf0PeqZzx1x^7LqX&rYGBu&xQ~x_}!T zF%^~QQgBo7fC%4GFet=OslZ_cBOJFm?!0|BWsK4cv@ypR$6bzb2DSfr!pgX|lg@G6 z^K@2IWT3(8VGYC+-ZX10o76CcX$=PMY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