did interface can implementation method ? i know its not
possible but my interviewer said its possible ..but how..?
any one have idea ???

Answer Posted / amit singh

its a not correct
true answer is that
if the interviewer ask that there is any backdoor
to do this then it is correct but "I THINK INTERVIEWER HAD
SOME HANGOVER"
right answer is no
above coding is right but not the answwer
beacuse
1):what he did in this code just define a class inside a
interface and define a method in this class
so question is not solve there is question in a question
and the answer is "YOU JUST BINDING THE B type with this
INTERFACE A"
not method implementation
amitsing2008@gmail.com

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is final static java?

521


What is the this keyword?

527


What are the differences between include directive and include action?

516


What do bitwise operators do?

503


What is the difference between JDK and JVM?

603






What is an infinite loop in java? Explain with an example.

556


How can we find the sum of two linked lists using stack in java?

544


Why stringbuffer is faster than string?

514


What is the longest unicode character?

669


When we should use serialization?

541


Explain about instanceof operator in java?

583


What is purpose of applet programming?

613


Difference between association, composition and aggregation?

535


Can we override private constructor in java?

488


What is a method in programming?

613