Question: Write a method called showCharacter which takes a String and a position and writes out to the screen the character at the position indicated. Write

Write a method called showCharacter which takes a String and a position and writes out to the screen the character at the position indicated.

Write a main method that asks the user for a String and a position. If the position is longer than the String, or the position is negative, it will keep prompting the user for a valid position. Main will call showCharacter with the String and the position.

Code in java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!