PRN211_-_SU_2024_-_FE_2375.webp
V

PRN211_-_SU_2024_-_FE_2375.webp

Kizspy | Question: 30
(Choose 1 answer)
class A{
public virtual void Print(){
Console.Write("Dot");
}
}
class B: A{
public override void Print(){
Console.Write("NET");
}
}
class Program{
static void Main(string[] args){
B obj = new B();
obj.Print();
A obj1 = new B();
obj1.Print();
Console.WriteLine();
}
}
The output will be:
A. NETNET
B. NETDot
C. An exception will be thrown
D. DotNET

Thông tin

Category
PRN211
Thêm bởi
Việt Hoàng1
Ngày thêm
Lượt xem
842
Lượt bình luận
7
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom