Question: Write a function that take a String containing a text using the function signature String useProperGrammar(String text) Your function should replace the word 2 with
Write a function that take a String containing a text using the function signature
String useProperGrammar(String text)
Your function should replace the word 2 with to and return the updated text.
For example,
useProperGrammar("can you go 2 the store?") should return
"can you go to the store?"
public String useProperGrammar(String text) { // Fix the grammar of the text }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
