can you create interface instance ?
Answer Posted / naresh jangili
no we can't create an object to interface and also abstract because two classes are un implememnted class for every un implemented classes we can create only reference varable.
but for every implemented classes we can create objects.
eg: interface A{
public void test()
}
class B implementes A
{
public void test()
{
s.o.p("hello");
}
public static void main(String argss[])
{
B b=new B(); (object creation)
A a1=null; (reference variable)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Java is pass by value or pass by reference? Explain
What is wrapper class html?
Write a function to print Fibonacci series and Tribonacci series?
What is the exact difference in between unicast and multicast object? Where we will use?
Does java initialize arrays to zero?
What is the use of protected in java?
Difference between current previous versions of Java?
Explain creating threads by extending thread class ?
What is callable java?
Explain the term virtual machine?
What are data types in oop?
What is the difference between notify and notifyall method?
What is method and methodology?
Can a private method of a superclass be declared within a subclass?
What is the maximum size of list in java?