PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Window.break();

B.
Glass.break();

C.
this.break();

D.
base.break();

7 Comments on “How should you call the Glass class implementation of the break() method?

  1. DB7 says:

    Depends from where called (mind you, questions states ‘how would you call the Glass implementation of the Break method’, not how would you implement it within Glass class).
    Either way…
    From Glass class = this.Break
    From Glass instance = cGlass.Break (Glass.Break is static syntax)

    Questions are hard to decipher, …as are the answer options???




    0



    0

Leave a Reply