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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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

Post 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 23 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 23 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply