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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, ajwiebel3475
Which requirement is an appropriate reason for a business to use it tools
Answers: 3
image
Computers and Technology, 23.06.2019 01:50, jumoke26
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors. java.
Answers: 2
image
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, Gearyjames8
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
You know the right answer?
1) A String variable , fullName, contains a name in one of two formats:

last name , firs...

Questions in other subjects: