1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex17521 [72]
3 years ago
5

write a java program using a do while loop to prompt the user to enter a password. The user should be prompted to enter the pass

word until the correct password "pals" is entered.
Computers and Technology
1 answer:
Alex787 [66]3 years ago
3 0
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");
You might be interested in
The part of a rocket engine that allows the combustion gases and flames to leave the rocket engine is the
coldgirl [10]
That would be A: Nozzle
6 0
3 years ago
I'll pay 50 dollars to anyone who can do this leave your snap after answering doing it and ill cash app it
gladu [14]

Well for must cases it is the Ram of the system and the processor I will show you how you can get rid of slow processing

  1. Run the task manager then try to stop some running programs
  2. the antivirus sometimes slows the computer due to the processing power it takes.
  3. I would recommend that all program should be closed from the task manager and close some running apps in the system settings go to start up and then close it now you are good to go.

5 0
3 years ago
Hello pls answer<br><br><br>what is the use of loop in java​
xxMikexx [17]
The use of loop in java is to run a block of code for a certain number of times.
7 0
3 years ago
A(n) __________ DHCPv6 server relies on router advertisements to give some information to individual hosts, making small changes
vodomira [7]

Answer:

Stateless

Explanation:

According to my experience in the field of information technology and networking, I can say that the type of server being mentioned is a Stateless DHCPv6 server. This is a server that provides some information to individual hosts within the network, but does not make any address assignments to the individual devices. Like mentioned in the question.

8 0
3 years ago
Which statement will remove 5:'softball' from the dictionary?
dimaraw [331]

Answer:

sports.pop(5)

Explanation:

edg 2020

4 0
3 years ago
Read 2 more answers
Other questions:
  • The fractional_part function divides the numerator by the denominator, and returns just the fractional part (a number between 0
    8·1 answer
  • What are some programs that you have used that have condition-controlled loops and count-controlled loops?
    10·1 answer
  • What is the smallest unit of data on the hard drive?
    5·1 answer
  • Which of these is a Microsoft certification for system engineers?
    9·1 answer
  • The Apple iPhone was a revolutionary product when it was introduced in 2007. To what extent do you agree or disagree with this s
    8·1 answer
  • When a partition is formatted with a file system and assigned a drive letter it is called a volume?
    10·1 answer
  • HELP AASAP BRAINLIEST JUST HELP
    13·1 answer
  • Answer the questions about PowerPoint using the drop-down menus,
    15·2 answers
  • Will give 5 star and the mark brainleist
    11·2 answers
  • Using a computer application is known as​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!