|
-
August 8th, 1999, 05:19 PM
#1
Abstract and Interface
Hi,
I have the code below.How do I implement in the main.
//// The code /////
interface B{
void SetColor();
}
abstract class C implements B{
int j =2;
int Set(int j){
System.out.println("abstract1");
return j;
}
}
class A extends C {
public static void main(String[] arg){
A a = new A();
a.Set(3);
a.SetColor(){
System.out.println("abstract2");
}
}
}
I am unable to implement the method from the interface.
Thanks,
Deepa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|