(Choose 1 answer)
Consider the following class:
1 . class Test {
void foo(int i) {
System.out.println("int version");
2345678 4. } 5.6
void foo(String s) { . System.out.println("String version");
7. }
9. public static void main(String args[]) {
10.Test t = new Test();
11.
char ch = 'p';t.foo(ch);12.
13.}
14.}
Which of the following statements is true?
A. Line 5 will not compile, because void methods cannot be overridden.
B. Line 12 will not compile, because no version of foo() takes a char argument.
C. The code will compile and produce the following output: String version.
D. The code will compile and produce the following output: int version.
Edt (15)