📚 Practice Mode
Java Practice Test - 3
Learn at your own pace with hints and detailed explanations
1 / 25
Multiple Choice
After the following code fragment, what is the value in fname?
String str;
int fname;
str = "Foolish boy.";
fname = str.indexOf("fool");
- 0
- 2
- -1
- 4