can we create instance for interface in java?

Answer Posted / venkateswararao

No,we cant create an instance if an interface in java , but
we can create a reference of an interface and we can
assign the object of a class to that interface reference.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a byte array?

859


How to set the permissions to a file in java?

766


What is the byte range?

808


Explain the advantages of packages in java?

717


What is stringreader?

717


How do you declare an array that will hold more than 64KB of data?

930


What are internal and external variables?

738


How do you find the independent variable?

749


What modifiers are allowed for methods in an interface?

893


Can a private method be declared as static?

799


If try block is successfully executed, Then Is Finally block executed?

841


what state does a thread enter when it terminates its processing? : Java thread

831


What is annotation in java?

803


Explain about features of local inner class?

841


What is the difference between yielding and sleeping?

804