What is the output of the following program?
class ExamPrep {
public static void main(String[] args){
String s = "Java";
int result = s.lastIndexOf("a");
System.out.println(result);
}
}
Choose the correct answer:
A. -1
B. 0
C. 1
D. 2
E. 3
F. 4
G. This program will not compile
H. This program will fail with an exception at runtime.