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
kirill115 [55]
3 years ago
14

Write a fragment of code that will read words from the keyboard until the word done is entered. For each word except done, repor

t whether its first character is equal to its last character. For the required loop, use a:_________.
a) while statement.
b) do-while statement.
Computers and Technology
1 answer:
hram777 [196]3 years ago
8 0

Answer:

a)

Scanner keyboard = new Scanner(System.in);

System.out.println("Enter a word");

String word = keyboard.next();

while(!word.equals("done"))

{

if(word.charAt(0) == word.charAt(word.length() - 1))

{

System.out.println("First and last character are equals for the word: " + word);

}

else

{

System.out.println("First and last character are NOT equals for the word: " + word);

}

word = keyboard.next();

}

b)

Scanner keyboard = new Scanner(System.in);

System.out.println("Enter a word");

String word = keyboard.next();

do

{

if(word.charAt(0) == word.charAt(word.length() - 1))

{

System.out.println("First and last character are equals for the word: " + word);

}

else

{

System.out.println("First and last character are NOT equals for the word: " + word);

}

word = keyboard.next();

}while(!word.equals("done"));

Next time note what language you are distributing programming with :)

You might be interested in
What is a document?read.Miércoles, 19 de agosto ¡Saludos Mario! ¿Cómo estás amigo? ¿Cómo está tu familia en Caracas? Mi familia
natka813 [3]

Answer:

A Document is a virtual paper that you can type on

Explanation:

A piece of written or electronic paper that provides information or evidence or that serves as an record.

7 0
2 years ago
Who is the father of modern computer?​
nydimaria [60]

Answer:

I would say Alan Turing is the father of the modern computer

7 0
3 years ago
Read 2 more answers
What two benefits are a result of configuring a wireless mesh network? Check all that apply.
Andrei [34K]

Answer:

1)PERFORMANCE

2)RANGE

Explanation:

A mesh network can be regarded as local network topology whereby infrastructure nodes connect dynamically and directly, with other different nodes ,cooperate with one another so that data can be efficiently route from/to clients. It could be a Wireless mesh network or wired one.

Wireless mesh network, utilize

only one node which is physically wired to a network connection such as DSL internet modem. Then the one wired node will now be responsible for sharing of its internet connection in wireless firm with all other nodes arround the vicinity. Then the nodes will now share the connection in wireless firm to nodes which are closest to them, and with this wireless connection wide range of area can be convered which is one advantage of wireless mesh network, other one is performance, wireless has greater performance than wired one.

Some of the benefits derived from configuring a wireless mesh network is

1)PERFORMANCE

2)RANGE

7 0
2 years ago
Which of the following is NOT a way to build on your strengths?
N76 [4]

Answer: the answer is B

Explanation: You can't raise your strengths if you only do sports you are good at:)

8 0
2 years ago
Read 2 more answers
You shut down VM1, configure the processor compatibility settings, and then start VM1. Does this meet the goal?
Naddik [55]

Answer:

Yes it does.

Explanation:

VM or virtual machines are enabled by the hypervisor in host operating systems. More than one virtual machine can run in an operating with only one processor.

Live migration, save and restore, and production checkpoints are all mobility processes that does not require rebooting the system. Since these virtual machine mobility processes is not compatible running directly on different processor, the virtual machine must be shutdown, and rebooted on the new processor host.

However, to run the virtual machine on a different processor without rebooting, the VM is run on processor compatibility mode (in the processor compatibility settings).

7 0
3 years ago
Other questions:
  • In an ha configuration, which two failure detection methods rely on icmp ping? (choose two.)
    12·1 answer
  • Write a program that tells what coins to give out for any amount of change from 1
    6·1 answer
  • In fixed-width files, each record is on a separate line and the fields are separated by a special character.
    7·1 answer
  • Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
    10·1 answer
  • What are the top ten alternative songs of the 2000's?
    7·1 answer
  • One of the most common uses of spreadsheet are
    8·1 answer
  • 5.17 (Calculating Sales) An online retailer sells five products whose retail prices are as follows: Product 1, $2.98; product 2,
    9·1 answer
  • JUST MAXED OUT THE COMMENTS anyways come here
    7·2 answers
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
  • Which of the following is the best description of an ip address?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!