Added Library JLINE
This commit is contained in:
17
src/main/java/org/cametendo/YesNo.java
Normal file
17
src/main/java/org/cametendo/YesNo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.cametendo;
|
||||
public class YesNo {
|
||||
public static boolean check(String input) {
|
||||
switch (input) {
|
||||
case "Y":
|
||||
return true;
|
||||
case "y":
|
||||
return true;
|
||||
case "":
|
||||
return true;
|
||||
case "n":
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user