can you create interface instance ?
Answer Posted / rushi shah
The above code given by Udaykiran gives the following error even before it is compiled:
Can not instantiate the type 'Test' type.
Which means that we can not create any object of interface.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Where and how can you use a private constructor?
Is null an object java?
How can you say java is object oriented?
Which collection does not allow duplicates in java?
Does java return by reference?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
What function extracts specified characters from a string?
Why java is used everywhere?
How do you know if a value is nan?
Can final class have constructor?
How do you create an array in java?
What are the advantages of passing this into a method instead of the current class object itself?
what is bmg file and how to create that files?what will it contailn?
What is meant by class loader? How many types are there? When will we use them?
What is instance means in java?