From 4c161e7190fbca7725b22e9489fad3364e8adb8d Mon Sep 17 00:00:00 2001 From: Carumar <1720808@stud.hs-mannheim.de> Date: Thu, 22 May 2025 14:06:27 +0200 Subject: [PATCH] Verbesserung des Codes --- Passwort_Check.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Passwort_Check.java b/Passwort_Check.java index 2a08d03..60e90ea 100644 --- a/Passwort_Check.java +++ b/Passwort_Check.java @@ -29,7 +29,7 @@ public class Passwort_Check { public static void main(String[] args) { String passwort = null; - boolean check = true; + boolean check = false; Scanner in = new Scanner(System.in); System.out.println("Geben Sie ein Passwort zur überprüfung ein:"); @@ -49,7 +49,7 @@ public class Passwort_Check { } else { System.out.println("Passwort ist sicher."); check = true; - break; // Optional, da Schleife sonst sowieso endet + } if (check == false) { System.out.println("Geben Sie ein verbessertes Passwort zur überprüfung ein:");