Jump to content

Java overriding question

zarrexx
Go to solution Solved by shadowbyte,

A. prints "horse eating hay"

B. prints "Horse eating apples"

C. prints "Animal eating treats

D. not sure about this one, but I'm fairly sure it would print "Horse eating carrots"

Stuck on a question for college, What would be the output of this program?

Capture.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

A. prints "horse eating hay"

B. prints "Horse eating apples"

C. prints "Animal eating treats

D. not sure about this one, but I'm fairly sure it would print "Horse eating carrots"

Snorlax: i7 5820k @4.5ghz, Asus X99 Pro, 32gb Corsair Vengeance LPX 2666, Cryorig R1 Ultimate, Samsung 850 evo 500gb, Asus GTX 1080 ROG Strix, Corsair RM850x, NZXT H440, Hue+

Smallsnor: Huawei Matebook X

 

Canon AE-1 w/ 50mm f/1.8 lens

Pentax KM w/ 55mm f/1.8 SMC lens

Zenit-E w/ 58mm f/2 Helios lens

Panasonic G7 with 14-42mm f/3.5 lens

Polaroid Spectra System

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×