We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb20a93 commit c0ebbb7Copy full SHA for c0ebbb7
bin/org/input4j/Input.class
-21 Bytes
src/org/input4j/Input.java
@@ -23,15 +23,12 @@ public static Character Char(String menssage) {
23
return c;
24
}
25
26
+ //Impossivel utilizar o mesmo objeto dos outros inputs
27
public static String Str(String menssage) {
28
+ Scanner rr = new Scanner(System.in);
29
System.out.printf(menssage);
-
- //Corrige erro de pular leitura
30
- if(read.hasNext()) {
31
- read.nextLine();
32
- }
33
34
- String s = read.nextLine();
+ String s = rr.nextLine();
+ rr.close();
35
return s;
36
37
0 commit comments