Java Practice Test - 3
Casual Mode - Take your time!
1 / 25
Correct
0
Incorrect
0
Score
0%
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