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
What is the output of a hash function called?
ruslelena [56]

Answer:

cryptographic hash collision.

Explanation:

4 0
3 years ago
What is one effect the internet has had on the library
Shkiper50 [21]

Answer:

The internet provides access to an abundance of information from home, making it easier for people to get answers much faster. This efficiency has caused libraries to receive less business and less users, therefore making their service less popular.

7 0
3 years ago
List 4 activities that might be included as part of a dependable software engineering process. Which of these do you think are m
Bogdan [553]

Answer:

  • Requirement Management
  • Requirement Reviews
  • Requirement Specification
  • System Modeling

Explanation:

Requirement Management  and specification are most suitable for agile project.

7 0
3 years ago
JAVA
Morgarella [4.7K]

import java.util.Scanner;

public class JavaApplication42 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Input a word:");

       String word = scan.nextLine();

       for (int i = 0; i < word.length(); i+=2){

           System.out.print(word.substring(i,i+1));

           

       }

   }

   

}

I hope this helps!

8 0
3 years ago
A
Sever21 [200]

Answer:

If your organization uses a database management system (DBMS) for mission-critical ... efficacy of modern applications that rely on databases for data storage and access. ... including troubleshooting, root cause analysis, fine tuning and optimizing the ... the business lexicon and translating it into a logical data model.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • What is the difference between the (BIOS) basic.input.output.system and R.O.M
    5·1 answer
  • Why is it important to not get distracted while driving?
    13·2 answers
  • Anicius boethius invented a system that made possible the memorization and written transmission of melodies.
    9·1 answer
  • What does the phrase at the drop of a hat mean?
    11·2 answers
  • Your organization uses a type of cryptography that provides good security but uses smaller key sizes and utilizes logarithms tha
    9·1 answer
  • JAVA
    12·1 answer
  • 9.
    15·1 answer
  • How can you remove background noise from a video?
    15·2 answers
  • You have instructed all administrators to disable all nonessential ports on servers at their sites. why are nonessential protoco
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!