Answered You can hire a professional tutor to get the answer.

QUESTION

A showChar Method Write a method named showChar. The method should accept two arguments : a reference to a String object and an integer .

1. A showCharMethod

Write amethodnamed  showChar. Themethod  should accept twoarguments : areference  to

aStringobject  and aninteger . Theintegerargument  is acharacter  position within the

String , with the firstcharacter  being at position 0. When themethod  executes, it should

display thecharacter  at thatcharacter  position. Themethod  does not return anything.

Here is an example of a call to themethod :

showChar("New York", 2);

In this call, themethod  will display thecharacter  w because it is in position 2. Demonstrate

themethod  in a completeprogram .

showChar("New York", 2);In this call, the method  will display the character  w because it is in position 2. Demonstratethe method  in a complete program . 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question