Added a Kotlin variation.
This commit is contained in:
parent
a97f742be2
commit
5ca9ab6c17
|
@ -3,7 +3,6 @@ import java.util.Scanner;
|
||||||
public class lab_1 {
|
public class lab_1 {
|
||||||
|
|
||||||
public static int protectedInput(String variableToRead, Scanner input) {
|
public static int protectedInput(String variableToRead, Scanner input) {
|
||||||
int readVariable;
|
|
||||||
do {
|
do {
|
||||||
try {
|
try {
|
||||||
System.out.printf("Enter %s: ", variableToRead);
|
System.out.printf("Enter %s: ", variableToRead);
|
||||||
|
|
Loading…
Reference in New Issue