Question: 1. A showChar Method Write a method named showChar. The method should accept two arauments: a reference to a String obiect and an integer. The

 1. A showChar Method Write a method named showChar. The methodshould accept two arauments: a reference to a String obiect and aninteger. The integer araument is a character position within the Strina, with

1. A showChar Method Write a method named showChar. The method should accept two arauments: a reference to a String obiect and an integer. The integer araument is a character position within the Strina, with the first character being at position 0. When the method executes, it should display the character at that character position. The method does not return anything. Here is an example of a call to the method: showChar(" New York", 2); In this call, the method will display the character w because it is in position 2. Demonstrate the method in a complete program. SAMPLE RUN #4: java Method showChar Interactive Session Hide Invisibles Enter . a . line . of . tex t. The . elevation . of . Mount . Everest . is . 29,029 . feet . (8,848n . meters).. Enter your index:354

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!