diff --git a/src/main/java/Contacts0.java b/src/main/java/Contacts0.java index 212842f..c6a0905 100644 --- a/src/main/java/Contacts0.java +++ b/src/main/java/Contacts0.java @@ -3,14 +3,13 @@ public class Contacts0 { + public static final int MAXIMUM_CAPACITY = 100; + public static void main(String[] args) { final Scanner SCANNER = new Scanner(System.in); - System.out.println("|| ==================================================="); - System.out.println("|| ==================================================="); - System.out.println("|| Contacts - Version 0.0"); - System.out.println("|| Welcome to Contacts!"); - System.out.println("|| ==================================================="); String[][] list = new String[100][3]; + displayWelcomeMessage(); + String[][] list = new String[MAXIMUM_CAPACITY][3]; int count = 0; while (true) { System.out.print("|| " + "Enter command: "); @@ -141,9 +140,17 @@ public static void main(String[] args) { break; } for (String m : new String[]{feedback, "==================================================="}) { - System.out.println("|| " + m); + System.out.println("|| " + m); } } } + + private static void displayWelcomeMessage() { + System.out.println("|| ==================================================="); + System.out.println("|| ==================================================="); + System.out.println("|| Contacts - Version 0.0"); + System.out.println("|| Welcome to Contacts!"); + System.out.println("|| ==================================================="); + } } diff --git a/src/main/java/Contacts1.java b/src/main/java/Contacts1.java index 8ede41d..0bee1fa 100644 --- a/src/main/java/Contacts1.java +++ b/src/main/java/Contacts1.java @@ -678,7 +678,7 @@ private static String getUsageInfoForExitCommand() { * @return string without the sign */ private static String removePrefixSign(String s, String sign) { - return s.replace(sign, ""); + return s.replace(sign, ""); } }