PRO192_-_C2_-_FE_-_SU_2023_398.webp
T

PRO192_-_C2_-_FE_-_SU_2023_398.webp

(Choose 1 answer)
}
Given the following code
class Base {}
class Agg extends Base{
public String getFields(){String name = "Agg";return name;}
public class Avf{
public static void main(String argv[]){
Base a = new Agg();/
/Here
}
What code placed after the comment //Here will result in calling the getFields method rest the string "Agg"?
A. System.out.println(a.getFields());
B. System.out.println(a.name);
C. System.out.println((Base) a.getFields());
D. System.out.println( ((Agg) a).getFields());
Exit 21

Thông tin

Category
PRO192
Thêm bởi
Thái Dương1
Ngày thêm
Lượt xem
2,464
Lượt bình luận
17
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_C2_-_FE_-_SU_2023_398.webp
File size
57.4 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom