Interface A {
String test();
}

Interface B {
int test();
}

Create a class AB which must implements both A & B
interfaces.

Answer Posted / niltarlekar

public class AB implements A,B
{
public static void main(String args[])
{

}
}

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the four integer types supported by java?

566


What is executor memory?

523


Where is const variable stored?

536


Write a program to search a number in the given list of numbers.

632


What is the purpose of an interface?

557






Can you inherit a constructor java?

578


Why do we use bufferedreader?

542


Is a boolean 1 bit?

615


Which oo concept is achieved by using overloading and overriding?

539


Differentiate between stringbuffer and string?

599


Java Compiler is stored in JDK, JRE or JVM?

1052


What is stack class in java?

547


What is class level lock ?

612


What is the purpose of sizeof operator?

532


4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (

1417