import [Link].
Scanner;
class LoginSystem {
// Private constructor is fine
private LoginSystem() {}
// Your authentication logic
public static void authenticate(String username, String
password) {
if ([Link]("admin") && [Link]("1234"))
{
[Link]("Login Successful");
} else {
[Link]("Login Failed");
}
}
// MOVE THE MAIN METHOD HERE
public static void main(String[] args) {
Scanner sc = new Scanner([Link]);
// Most lab systems expect these prompt messages
[Link]("Enter Username: ");
String username = [Link]();
[Link]("Enter Password: ");
String password = [Link]();
// Call the method within the same class
authenticate(username, password);
[Link]();
}
}
// DELETE the "class Main" section entirely