Answer Posted / bharat vandar
No we can instantiate interface directly.but we can create
instantiate of interface in directly,only class can create
an object of interface
interface x
{
public void abc();
}
class ac implements x
{
x at = new ac();
public void abc()
{
System.out.println("Bharat");
}
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is difference between ++ I and I ++ in java?
When should we create our own custom exception classes?
What is a lightweight component?
Can a lock be acquired on a class in java programming?
Write a program to find maximum and minimum number in array?
How to perform selection sort in java?
What is the difference between replace and replace all?
how can i use a nonsynchronized hashtable?
Which is dependent variable?
What is final keyword?
Where is stringbuffer stored?
How are variables stored?
How do you sort in descending order in java using collections sort?
What is hashmap in java?
How do you check if a string contains only numeric digits?