File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes How can it compile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How can it compile" Watch "How can it compile" New topic

How can it compile

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 388

A is not a Runnable , how can all these compile

Oracle Java Programmer , Oracle SQL Expert , Oracle Java Web Component Developer, Oracle Web Service Developer
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46367
Have you tried it? What happened?
Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 388

It compiles successfully
Keerthana Bijoor

Joined: Mar 01, 2013
Posts: 2
Cast between an unrelated class and interface is allowed because they might have a common subtype.
Winston Gutkowski

Joined: Mar 17, 2011
Posts: 8942

Mahtab Alam wrote:It compiles successfully

Maybe; but I'll bet you got a LOT of warnings about unchecked casts.


Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here
I agree. Here's the link:
subject: How can it compile
jQuery in Action, 3rd edition