can you create interface instance ?
Answer Posted / ramu
hey uday u r wrong
In your program you are not created obj for interface, you have given anonymous implementation for 'Test' interface and instantiated that anonymous class only but not the interface.
for conformation call getClass() on 't'.(t.getClass())
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is alive method in java?
What is a databasemetadata?
What is the public method modifier?
What is anagram of a string?
How to invoke external process in java.
What data type is true or false?
Write a program in java to create a doubly linked list containing n nodes.
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
Can size_t be negative?
What are the two types of exceptions in java? Which are the differences between them?
Can java list be null?
Explain the difference between collection api and stream api in java8?
What are the basic concepts of OOPS in java?
What is a nested list?
What is multi level inheritance in java?