Question: Create & Return an Array of Characters In the method arrayToWord ( ) take the value of userArray and return a String: Take each letter
Create & Return an Array of Characters
In the method arrayToWord take the value of userArray and return a String:
Take each letter in userArray
Concatenate it onto a String StringBuilder can be used here
Return the String result from your arrayToWord method.
Solution
Reset
Java
Sample Test Case #
J
a
v
a
Execute code
STDOUT
CodingQuestion.java:: error: cannot find symbol
char charArray new charuserWordlength;
symbol: variable userWord
location: class CodingQuestion
CodingQuestion.java:: error: cannot find symbol
for int i ; i userWord.length; i
symbol: variable userWord
location: class CodingQuestion
CodingQuestion.java:: error: cannot find symbol
charArrayi userWord.charAti;
symbol: variable userWord
location: class CodingQuestion
CodingQuestion.java:: error: incompatible types: char cannot be converted to String
return charArray;
errors
Expected STDOUT
Your string is:
Java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
