Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, kebo63
Page orientation can be either landscape or
Answers: 1
image
Computers and Technology, 21.06.2019 22:30, enazer
Type the correct answer in the box. spell all words correctly. what kind of graph or chart does this image represent? the given image represents a (blank).
Answers: 2
image
Computers and Technology, 23.06.2019 21:10, jmolina57
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
image
Computers and Technology, 23.06.2019 23:30, econsta3
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
Do you know the correct answer?
Java- string playwrite a program using scanner and its nextline method. the following is an example...

Questions in other subjects:

Konu
Business, 06.03.2021 01:10
Konu
Social Studies, 06.03.2021 01:10
Konu
Mathematics, 06.03.2021 01:10