L3.2: Logical Expressions: Logical operators - && And (both have to be true)

PHOTO EMBED

Fri Sep 29 2023 14:16:16 GMT+0000 (Coordinated Universal Time)

Saved by @TestProSupport

public class Main {
    public static void main(String[] args) {
      
        String username = "admin";
        String password = "password";
        boolean isLoginSuccessful = username.equals("admin") && password.equals("password");

        System.out.println("Login successful: " + isLoginSuccessful);
    }
}
content_copyCOPY