X120: makeOutWord

Given an out string of length 4, such as "<<>>", and a word, return a new string where the word is in the middle of the out string, e.g. "<>". Note: use str.substring(i, j) to extract the String starting at index i and going up to but not including index j.

Your Answer:

x
 
1
public String makeOutWord(String out, String word)
2
{
3
    
4
}
5
Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.