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


Please Help Members By Posting Answers For Below Questions

How to store image in arraylist in java?

714


What is a locale?

910


Is java a utf 8 string?

748


Why declare Main() inside the class in java ?

805


Is null function in java?

785


Can a final variable be initialized in constructor?

708


What is the difference between array list and vector in java?

734


What is void keyword?

863


What is a variable declaration?

758


Explain naming conventions for packages?

777


Give reasons supporting that string is immutable.

718


What is join () in java?

727


Tell me about your ability to work under pressure

1956


Explain about anonymous inner classes in java?

787


What is the collections api?

787