Answer Posted / subhash
No.We cannot create instance for interface.But we can
create reference to an interface.We can implement the
interface by creating sub class(implementation class) and
creat instance to the sub class, then you can create
reference to the interface by assigning instance of sub
class to the interface reference variable.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is the difference between numeric and integer?
What is a for loop in java?
What happens if main method is not static?
How would you format a date in java? I.e. In the ddmmyyy format?
Write a function to print Fibonacci series and Tribonacci series?
What is overloading and overriding in java?
What is visibility mode?
What is the reflection?
Name some OOPS Concepts in Java?
What is general methodology?
What is off heap memory?
Is it possible to override the main method?
What are the restriction imposed on a static method or a static block of code?
How many bits is a string in java?
Why inputstreamreader is used in java?