How should you call the Glass class implementation of the break() method?

You have a class named Glass that inherits from a base class named Window. The Window
class includes a protected method named break().
How should you call the Glass class implementation of the break() method?

You have a class named Glass that inherits from a base class named Window. The Window
class includes a protected method named break().
How should you call the Glass class implementation of the break() method?

A.
Window.break();

B.
Glass.break();

C.
this.break();

D.
base.break();



Leave a Reply 4

Your email address will not be published. Required fields are marked *


dounia

dounia

I think is Window.break() not B

Antoine

Antoine

you’re in the class and you should be there becouse it is protected.
so it is this.break();

aaaa

aaaa

Answer is B, because they ask “How should you call the Glass class implementation of the break()?”

aaaa

aaaa

My bad its C