can we create a instance for intwerface?

Answer Posted / uma

no.Interface is similar to class but they lack instance
variable, their methods are declared with out any body.
Interfaces are designed to support dynamic method
resolution at run time. All methods in interface are
implicitly
abstract, even if the abstract modifier is omitted.
Interface methods have no implementation;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need singleton?

748


What are the two parts of a conditional statement?

730


How will you initialize an Applet?

838


What is the purpose of javac exe?

787


What is a hashmap used for?

901


Why is multiple inheritance not supported in java?

779


What are the different collection views provided by maps?

766


If I only change the return type, does the method become overloaded?

732


What is the difference between @before and @beforeclass annotation?

751


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

834


Is an integer an object?

721


How will you load a specific locale?

744


What is the difference between an if statement and a switch statement?

895


Can we have static methods in an interface?

795


What do you understand by soft reference?

811