vendredi 18 décembre 2020

How to bypass an if statement?

Take for example the following code. I am looking at if there is any system input I can give that will bypass either of these inputs? I am simply wondering just for the sake of protection of a dummy login I am making.

  //Account Number
    String validAN = scanner.nextLine();
    
if(validAN.equals("testaccount") || validAN.equals("001")){
       System.out.println("Please enter your name");
       String validName = scanner.nextLine().toLowerCase();

Aucun commentaire:

Enregistrer un commentaire