When I type this code in it brings up an error saying
"cannot find symbol length"
All I am trying to do is find the length of the string and store that length into a variable.
Can anyone help me find the problem?
String[] words = {
"hello", "java", "yamaha", "dell", "hydro"
};
a = (int) (Math.random() * 6);
b = (words[a]).length;