Consider the following code. What is the error? class x [ public int a; protected int b; 3 class yox public void display [ Console.WriteLine(a); Console.WriteLine(b); } } variable a is not accessible in class y O variable b is not accessible in class y O no error
Consider the following code. Which statement is correct? class x public void display() { Console.WriteLine("x"); ] } class y: x public void show() ( Console.WriteLine("y"); 3 class Program { static void Main(string[] args) y an Object = new y(); anObject display(); Console.ReadKey(); The output is x The output is y There is an error because method display() is not defined in class y
Consider the following code. What is the error? class x [ public int a; protected int b; 3 class yox public void display
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Consider the following code. What is the error? class x [ public int a; protected int b; 3 class yox public void display
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!