From 2494bea36c5073ebb8f5bf00acfe0a5420326224 Mon Sep 17 00:00:00 2001 From: Rhinemann Date: Sun, 7 May 2023 22:20:31 +0300 Subject: [PATCH] Camel case. --- Java/lab_1/lab_1.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Java/lab_1/lab_1.java b/Java/lab_1/lab_1.java index 467bd9b..e9ce63e 100644 --- a/Java/lab_1/lab_1.java +++ b/Java/lab_1/lab_1.java @@ -2,19 +2,19 @@ import java.util.Scanner; public class lab_1 { - public static int protectedInput(String variable_to_read, Scanner input) { - int read_variable; + public static int protectedInput(String variableToRead, Scanner input) { + int readVariable; do { try { - System.out.printf("Enter %s: ", variable_to_read); - read_variable = input.nextInt(); + System.out.printf("Enter %s: ", variableToRead); + readVariable = input.nextInt(); break; } catch (Exception e) { - System.out.printf("%s must be an integer.\n", variable_to_read.toUpperCase()); + System.out.printf("%s must be an integer.\n", variableToRead.toUpperCase()); input.nextLine(); } } while (true); - return read_variable; + return readVariable; } public static void main(String[] args) {