• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can it compile

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A is not a Runnable , how can all these compile

 
Campbell Ritchie
Marshal
Posts: 53138
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried it? What happened?
 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It compiles successfully
 
Keerthana Bijoor
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cast between an unrelated class and interface is allowed because they might have a common subtype.
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mahtab Alam wrote:It compiles successfully

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

Winston
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!