subject
Computers and Technology, 13.11.2020 01:00 doversu

PLEASE HELP asap 60 POINTS needs to be in Java

A programmer has written a method called replaceLetter that counts the amount of times a letter is present in a word. Your job is to modify this existing method to fulfill a new purpose.

Rather than count the instances of a letter in a String, write a program that replaces all instance of one letter with another. You should directly modify replaceLetter to get this program to work. In the starter code, replaceLetter only has two parameter values. Your new version should have a third parameter to indicate which String value is replacing the existing letter.

For example,

replaceLetter("hello", "l", "y")
returns

"heyyo"
Sample output:

Enter your word:
hello

Enter the letter you want to replace:
l

Enter the replacing letter:
x
hexxo
Hint: The letters will be assigned from the user as String values. Make sure to use String methods to compare them!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
Answers: 2
You know the right answer?
PLEASE HELP asap 60 POINTS needs to be in Java

A programmer has written a method called...
Questions
question
Mathematics, 30.01.2021 01:00
question
English, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
Questions on the website: 13722367