subject
Computers and Technology, 14.02.2020 05:15 kyle65

1) A String variable , fullName, contains a name in one of two formats:

last name , first name (comma followed by a blank), or

first name last name (single blank)

Extract the first name into the String variable firstName and the last name into the String variable lastName. Assume the variables have been declared and fullName already initialized . You may also declare any other necessary variables .

2)

Write a loop that reads strings from standard input where the string is either "land", "air", or "water". The loop terminates when "" (five x characters ) is read in. Other strings are ignored. After the loop, your code should print out 3 lines: the first consisting of the string "land:" followed by the number of "land" strings read in, the second consisting of the string "air:" followed by the number of "air" strings read in, and the third consisting of the string "water:" followed by the number of "water" strings read in. Each of these should be printed on a separate line.

ASSUME the availability of a variable , stdin, that references a Scanner object associated with standard input.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their check-ins to publish a trip? a. whrrl b. buzzd c. foursquare (this option is wrong i already tried) d. gowalla for plato
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
You know the right answer?
1) A String variable , fullName, contains a name in one of two formats:

last name , firs...
Questions
question
Mathematics, 06.09.2020 04:01
question
Mathematics, 06.09.2020 04:01
question
Mathematics, 06.09.2020 05:01
Questions on the website: 13722363