subject

Java- string playwrite a program using scanner and its nextline method. the following is an example of how to use nextlinescanner kybd = new scanner(system. in); system. out. println("enter a line of text"); string aline = kybd. nextline(); if the user's input is shorter than 7 characters, print the message "the input is too short" and do no further processing. if the user's input is 7 characters or longer, perform the following operations. print either "the original string has no leading or trailing whitespace" or "the original string has leading or trailing whitespace." (hint: the trim method will be a good start, but you'll need more.)swap the first four and last three characters of aline and print the result. print aline in all upper case. print the compareto results of comparing aline in all lower case with the original aline. (this will be a number.)print whether the first half of aline is the same as the last half of aline except for case. print aline with the first 'c' 'c' 'd' or 'd' removed. note: treat each of these steps as an independent action operating on the original input. so if the original input waskilroy was here, but not godotswapping the first four and last three characters would printdotoy was here, but not gokilrand printing aline in all upper case would result inkilroy was here, but not godotyou may use only string's indexof, charat, length, compareto, touppercase, tolowercase, trim, equals, equalsignorecase and substring methods.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 24.06.2019 02:50
Be sure to answer all parts. synthesize the following compound from benzene. a. b. c. d. e. f. reaction [1] conditions: a b c d e f reaction [1] product: draw structure reaction [2] conditions: a b c d e f reaction [2] product: draw structure reaction [3] conditions: a b c d e f reaction [3] product:
Answers: 3
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
You know the right answer?
Java- string playwrite a program using scanner and its nextline method. the following is an example...
Questions
question
Mathematics, 12.04.2020 04:43
question
Chemistry, 12.04.2020 04:44
question
History, 12.04.2020 04:58
Questions on the website: 13722367