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
Can we define private and protected modifiers for variables in interfaces?
What is ‘has a’’ relationship in java?
Is java good for beginners?
What happens if we don’t override run method ?
How many types of exception can occur in a java program?
What is comparator in java?
Java is pass by value or pass by reference? Explain
Can we pass a primitive type by reference in java? How
what is ststic with example
What is meant by class loader? How many types are there?
When is finally block not called?
How is abstraction implemented in java ?
What is the purpose of return statement?
If you are given the name of the function at run time how will you invoke the function?
Can long be null in java?