java - Interface implicit mechanism -
in java example thread can created using either implementing runnable
or extending thread
class. understand extending class implementing interface how jvm decide attach it. such implementation purely implicit mechanism or missing here.
edit: same concept while create objects map map=new hashmap()
, how maintain containing hashmap object. info stored in object or reference. how jvm looks @ it?
is such implementation purely implicit mechanism or missing here.
a thread not implicitly created act of implementing runnable
. instance of such object must explicitly passed thread
constructor:
new thread(myrunnable);
clearly, thread
instance break no sweat figuring out runnable
call.
Comments
Post a Comment