PRO192_-_C2_-_RE_-_SU_2023_558.webp
N

PRO192_-_C2_-_RE_-_SU_2023_558.webp

(Choose 1 answer)
Given the following Java code:
//--
class A { void dojob1() {}}// 1
class B extends A { void dojob2() {}}
// 3
class Robot { // 4
public static void main(String[] args){
A a1 = new A();// 6
A a2 = new B();117
B b1 = new B();
// insert some code here
// 8
// 10
//
//11
// 5
1/2
// 9
}
Which of the following, inserted at line 9, will compile?
A. a2.dojob2();
B. (B)a2.dojob2();
C. ((B)a2).dojob2();
D. None of the above statements will compile
E15

Thông tin

Category
PRO192
Thêm bởi
Naobito2000
Ngày thêm
Lượt xem
1,829
Lượt bình luận
12
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_C2_-_RE_-_SU_2023_558.webp
File size
59 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom