For the first one its NOW, I'm not sure about the 2nd, the 3rd I think is penal code cases but i could be wrong, and the 4th one sounds like voting is the most logical answer.
We can import Scanner from Java.utils.Scanner to pull in text entered in the console.
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String password = "";
do {
System.out.print("Enter your password: ");
password = sc.nextLine();
if(!password.equals("pals") {
System.out.println(\nIncorrect Password. Try again.");
}
} while(!password.equals("pals");
Answer:
understanding component interaction