create base
This commit is contained in:
16
YesNo.java
Normal file
16
YesNo.java
Normal file
@@ -0,0 +1,16 @@
|
||||
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