Which method1 will be executed when the following statements are executed?
(code}
ClassA item1 = new ClassB();
item1.method1();
```
```
Given the following code:
Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public void method1(int a){}
Line 5 }
Line 6 public class ClassB extends ClassA
Line 7 {
Line 8 public ClassB(){}
Line 9 public void method1(){}
Line 10 }
Line 11 public class ClassC extends ClassB
Line 12 {
Line 13 public ClassC(){}
Line 14 public void method1(){}
Line 15 }
```
a. method1 on Line 4
b. method1 on Line 9
c. method1 on Line 14
d. This is an error and will cause the program to crash.
b. method1 on Line 9
You might also like to view...
Which common attribute of all access controls is used to identify unique records in a set, such as a username?
A) Identification scheme B) Authentication method C) Authorization model D) None of the above
Two wireless standards are WiFi and ________
A) SCSI B) FireWire C) Bluetooth D) USB 2.0
By default, Excel for Mac uses a ____ year value.
A. two-digit B. four-digit C. hexadecimal D. none; there is no default value for years to an Excel for Mac.
The command that resizes a picture to a percentage of its size is:
a. scale b. suppress c. crop