What is the result?

Given:

What is the result?

Given:

What is the result?

A.
riding riding tolting

B.
riding riding cantering

C.
tolting cantering tolting

D.
tolting cantering cantering

E.
Compilation fails.

F.
An exception is thrown at runtime.

Explanation:

The compilation fails at:
interface Rideable {
public String ride() { return “riding “;}
}
Error due to: interface methods cannot have body.



Leave a Reply 3

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


BKhateib

BKhateib

Verified

jalex

jalex

The answer is E.