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, 22.06.2019 23:30, kenken2583
Jaina and tomas are being considered as new tenants in an apartment. the landlord looks at their creditworthiness because he wants to be sure his new tenant pays the rent on time and in full. the table below summarizes the information that was on their applications. application information questions jaina tomas how many years have you had your job? 5 2 what is your monthly salary? $1,850 $2,500 how many credit cards do you have? 4 1 how much debt do you have? $13,000 $7,000 how many times were you late with payments on credit cards in the past year? 5 1 who will the landlord decide to be more creditworthy and why? tomas because the ratio of his debt to income is less. jaina because she has had her job longer, which makes her look more stable. jaina because she has more credit cards available to her. tomas because he makes more money per month.
Answers: 2
image
Computers and Technology, 23.06.2019 05:00, mariahchaparro08
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, summerjoiner
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
image
Computers and Technology, 24.06.2019 03:40, Eylul30
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i. e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
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: