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
Is list ordered in java?
According to java operator precedence, which operator is considered to be with highest precedence?
Can you create an object of an abstract class?
What is the static method?
Is void a return type?
What is null in java?
Why string is called as immutable?
What is hash in java?
What is return code?
How do you check if two given string are anagrams?
Explain what access modifiers can be used for methods?
What is the tradeoff between using an unordered array versus an ordered array?
What is outofmemoryerror in java?
Can we sort a map in java?
What is a class object?