Page 1 of 1

Consider the following code. What is the error? class x [ public int a; protected int b; 3 class yox public void display

Posted: Fri Apr 29, 2022 7:07 am
by answerhappygod
Consider The Following Code What Is The Error Class X Public Int A Protected Int B 3 Class Yox Public Void Display 1
Consider The Following Code What Is The Error Class X Public Int A Protected Int B 3 Class Yox Public Void Display 1 (40.86 KiB) Viewed 25 times
Consider The Following Code What Is The Error Class X Public Int A Protected Int B 3 Class Yox Public Void Display 2
Consider The Following Code What Is The Error Class X Public Int A Protected Int B 3 Class Yox Public Void Display 2 (67.28 KiB) Viewed 25 times
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