can we create instance for interface in java?

Answer Posted / jyotisubhra ghosh

You can not instantiate an interface,however, u can create
its reference variabe.

You can just assign an object of a class (implementing the
interface) to the reference variable of the interface.

Is This Answer Correct ?    50 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the high-level thread states in java programming?

840


What is the effect of keeping a constructor private?

684


What is blank final variable?

797


Does sprintf allocate memory?

824


Can we have multiple classes in single file ?

823


What is floating data type?

754


What is java Applet?

829


What is ‘is-a ‘ relationship in java?

796


Is java map thread safe?

705


What is a predicate method?

754


what is the difference between thread and runnable types? : Java thread

766


Can list have duplicates in java?

709


What an i/o filter in java programming?

796


For class CFoo { }; what default methods will the compiler generate for you>?

845


What is nextint java?

752