The getValue() method is overridden in two ways. Which one is correct?

```
I:
public class Test {
public static void main(String[] args) {
A a = new A();
System.out.println(a.getValue());
}
}

class B {
public String getValue() {
return "Any object";
}
}

class A extends B {
public Object getValue() {
return "A string";
}
}

II:
public class Test {
public static void main(String[] args) {
A a = new A();
System.out.println(a.getValue());
}
}

class B {
public Object getValue() {
return "Any object";
}
}

class A extends B {
public String getValue() {
return "A string";
}
}
```
a. I
b. II
c. Both I and II
d. Neither


b. II

Computer Science & Information Technology

You might also like to view...

There are ____ main file formats involved in creating a Flash video.

A. one B. two C. three D. four

Computer Science & Information Technology

If a balanced binary search tree contains 10 elements, then what is its depth?

a. 3 b. 2 c. 4 d. This cannot be determined – it depends on the elements and the order of their insertion

Computer Science & Information Technology

Data can be copied from Excel and pasted into an Access table

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following HTML tags defines table cell data?

A. B. C. D.

Computer Science & Information Technology