Interface A {
String test();
}
Interface B {
int test();
}
Create a class AB which must implements both A & B
interfaces.
Answers were Sorted based on User's Feedback
Answer / akhil agarwal
Interface A
{
string test();
}
Interface B
{
int test();
}
class AB implements A,B
{
string test();
int test();
}
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / 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 |
Answer / srinivasa
Class AB Implements A,B{
String test(){
SOS("----");
}
int test(){
SOS("--------");
}
}
Is This Answer Correct ? | 1 Yes | 4 No |
Answer / niltarlekar
public class AB implements A,B
{
public static void main(String args[])
{
}
}
Is This Answer Correct ? | 0 Yes | 4 No |
Answer / 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 |
Answer / sandeep vudutala
interface A
{
String test();
}
interface B extends interface A
{
int test();
}
public Class AB implements B
{
public String test()
{
}
public int test()
{
}
}
Is This Answer Correct ? | 5 Yes | 23 No |
what is Vector class?
Hi ,i convert contrller as jSp And presentation as servlet ...will it do? if so what are advantage and idsadvantages
What are File and RandomAccessFile classes?
Can a function return a function?
What is reflexive association?
What is the main method java?
Why stringbuilder is not thread safe?
What are the advantages of autoboxing?
Is c better than java?
Explain all java features with real time examples
How do I know if java is installed?
What is generic type?