Q34.webp
N

Q34.webp

Question: 34
(Choose 1 answer)
What is the output of the following Java program?
class A{
int i= 100;
}
public void printValue(){
System.out.print("A");
class B extends A{
int i =120;
public void printValue(){
System.out.print("B");
public class Main{
public static void main(String args[]){
A a = new B();
a.printValue();
System.out.print(a.i);
A. B100
B. B120
C. A100
D. A120

Thông tin

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

Share this media

Back
Bên trên Bottom