This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How can it compile" Watch "How can it compile" New topic
Author

How can it compile

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 172

A is not a Runnable , how can all these compile



Mahtab Alam (OCJP )
Blogs : alamsql.blogspot.in , alammahtab.blogspot.in
Campbell Ritchie
Sheriff

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

Joined: Mar 28, 2012
Posts: 172

It compiles successfully
Keerthana Bijoor
Greenhorn

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

Joined: Mar 17, 2011
Posts: 7029
    
  16

Mahtab Alam wrote:It compiles successfully

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

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can it compile
 
Similar Threads
Doubt about casting and final classes
Casting
Array Assignments
Inheritance and Polymorphism Involving Interface Casting
Please HELP...Devaka Exam Test 2 Number 69. I totally don't understand it.