Interface A {
String test();
}
Interface B {
int test();
}
Create a class AB which must implements both A & B
interfaces.
Answer Posted / menita
interface A
{
String test();
}
interface B
{
int test();
}
public class AB implements B
{
A obj1 = new A(){
public String test()
{
return "";
}
};
public int test()
{
return 0;
}
}
| Is This Answer Correct ? | 7 Yes | 10 No |
Post New Answer View All Answers
What is meant by design patterns?
Discuss 2D arrays.
Is it possible to override the main method?
What is a byte string?
Can a top level class be private or protected?
What are thread groups?
What are the important features of Java 9 release?
What is a stringbuilder?
What is string made of?
How do you join strings in java?
Which class represents the socket that both the client and server use to communicate with each other?
How does hashmap work in java ?
How does arraylist work in java?
What is the difference between an if statement and a switch statement?
How will you add panel to a frame?