Given Flower rose new Flower rosesmell When you run it it s

Given: Flower rose = new Flower(); rose.smell(); When you run it, it should be: A. I smell good B. No smell C. Compiles ok. Fails at runtime D. Fail to compile E. I smell yummy!

Solution

Answer:

D. Fail to compile

We dont know about flower here. It is not predefined .Unidentified identifier should be error.

Given: Flower rose = new Flower(); rose.smell(); When you run it, it should be: A. I smell good B. No smell C. Compiles ok. Fails at runtime D. Fail to compile

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site