subject

Write code to take a String input from the user, then print the first and last letters of the string on one line. Sample run: Enter a string: surcharge se Hint - we saw in the lesson how to get the first letter of a string using the substring method. Think how you could use the .length() String method to find the index of the last character, and how you could use this index in the substring method to get the last character.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:30
Agood flowchart alludes to both the inputs and outputs you will need to receive and give to the user. true or false?
Answers: 3
question
Computers and Technology, 22.06.2019 18:00
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
You know the right answer?
Write code to take a String input from the user, then print the first and last letters of the string...
Questions
question
Mathematics, 12.03.2021 14:00
question
History, 12.03.2021 14:00
question
Computers and Technology, 12.03.2021 14:00
question
Mathematics, 12.03.2021 14:00
question
Biology, 12.03.2021 14:00
question
Mathematics, 12.03.2021 14:00
Questions on the website: 13722363