Interface A {
String test();
}
Interface B {
int test();
}
Create a class AB which must implements both A & B
interfaces.
Answer Posted / sailaja
Interface A {
String test();
}
Interface B {
int test();
}
Class AB implements A,B
{
String test()
{
System.out.println("Test");
}
int test()
{ System.out.println("Test1");
}
}
Class Test
{
public static void main(String as[])
{
Interface i=null;
i=new AB();
i.test();
}
}
| Is This Answer Correct ? | 4 Yes | 10 No |
Post New Answer View All Answers
What are facelets templates?
What is an interface in java?
What is * argv?
What is the use of callablestatement?
What is function and method in java?
How you can force the garbage collection?
Is int primitive data type?
What is logical variable?
Explain what access modifiers can be used for methods?
Describe what happens when an object is created in java ?
What are static methods?
What is the vector class in java programming?
Can singleton class be cloned?
What is difference between local variable and global variable?
what is the major difference between linkedlist and arraylist in java?