Consider the following code. Which statement is correct? class x { protected void display() { Console.WriteLine("x"); 3

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. Which statement is correct? class x { protected void display() { Console.WriteLine("x"); 3

Post by answerhappygod »

Consider The Following Code Which Statement Is Correct Class X Protected Void Display Console Writeline X 3 1
Consider The Following Code Which Statement Is Correct Class X Protected Void Display Console Writeline X 3 1 (69.45 KiB) Viewed 24 times
Consider The Following Code Which Statement Is Correct Class X Protected Void Display Console Writeline X 3 2
Consider The Following Code Which Statement Is Correct Class X Protected Void Display Console Writeline X 3 2 (60.38 KiB) Viewed 24 times
Consider the following code. Which statement is correct? class x { protected void display() { Console.WriteLine("x"); 3 } class y: x { protected void show() { Console.WriteLine("y"); ] ] class Program { static void Main(string[] args) { y anObject = new y(); anObject.show(); Console.ReadKey(); ] } The output is x The output is y There is an error because method show() is not accessible in class program
Consider the following code. Which statement is correct? class x public x(int a) 1 Console.WriteLine("x"); class yox public y(int b) Console.WriteLine("y"); 1 class Program static void Main(string[] args) yanObject - new y(2); Console.ReadKey(); 1 1 The output is x The output isy There is an error because x does not a parameterless constructor
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply