• Post Reply Bookmark Topic Watch Topic
  • New Topic

Null  RSS feed

 
vigneswar rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai.

Can we assign a null reference to a local variable which refers to an interface?

cheers!
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This rather odd question has been asked recently here, almost verbatim the same. Can you tell us where this comes from, please?

The answer is, as already stated, "Yes", to which I would add "of course. Interface variables are no different from any other kind of reference variable."
 
ak pillai
author
Ranch Hand
Posts: 288
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This rather odd question has been asked recently here, almost verbatim the same

Nice catch Ernest !
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!