What is the result?

Given:

What is the result?

Given:

What is the result?

A.
Up Down

B.
Up Up

C.
Up null

D.
Compilation fails

E.
An exception is thrown at runtime

Explanation:
Exception in thread “main” java.lang.ExceptionInInitializerError at garden.Garden.main
Caused by: java.lang.RuntimeException: Uncompilable source code – garden.Plant is not abstract
and doesnot override abstract method growthDirection() in garden.Plant



Leave a Reply 2

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


Tim

Tim

The question seems to be incomplete – it also misses Carrot.