subject

Write a method called processname that accepts a scanner for the console as a parameter and that prompts the user to enter his or her full name, then prints the name in reverse order (i. e., last name, first name). you may assume that only a first and last name will be given. you should read the entire line of input at once with the scanner and then break it apart as necessary. here is a sample dialogue with the user:
output: enter your full name: sammy jankisyour name in reverse order is jankis, sammywhat i have: public static void processname(scanner in){system. out. print(" enter your full name: "); string name = in. nextline(); string lastname= in. substring(6,11); string firstname= in. substring(0,5); system. out. println("your name in reverse order is " + lastname + ", " + firstname); }

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:20, alcantar28eduin
Print "usernum1 is negative." if usernum1 is less than 0. end with newline. convert usernum2 to 0 if usernum2 is greater than 10. otherwise, print "usernum2 is less than or equal to 10.". end with newline
Answers: 3
image
Computers and Technology, 22.06.2019 19:30, mitalichavez1
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 24.06.2019 20:00, Cookie320
Write c++programs for the following problem: let the user enter two numbers and display which is greater. !
Answers: 1
You know the right answer?
Write a method called processname that accepts a scanner for the console as a parameter and that pro...

Questions in other subjects:

Konu
Computers and Technology, 29.07.2019 23:00
Konu
Chemistry, 29.07.2019 23:00