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, 22.06.2019 11:00
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How would you cite different books by the same author on the works cited page? moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. –––. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. –––. folk songs and ballads. salem: poetry press, 1999. print.
Answers: 2
You know the right answer?
Java- string playwrite a program using scanner and its nextline method. the following is an example...
Questions
question
Mathematics, 20.11.2019 19:31
question
Mathematics, 20.11.2019 19:31