PRN211_-_SP_2023_-_FE_167.webp
hirosi212

PRN211_-_SP_2023_-_FE_167.webp

(Choose 1 answer)
}
class A {
protected int x;
public A()
{ x = 2;
} public void Print()
Console.Write(x*x);
}
} class B: A {
public new void Print()
Console.Write(++x);
}
}
class Program
{
static void Main(string[] args)
{
A obj1 = new B();
obj1.Print();
Console.WriteLine();
} The output will be
A. 4
R 1
Exit 50

Thông tin

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

Share this media

Back
Bên trên Bottom