Guest_imported
New member
- Jan 1, 1970
- 0
Hi, Im very new to java and have some questions.
How do I display a picture for Applets.And Can I make a standalone .EXE with java?
So in java, does an "interface", only contains function prototypes and not implementation? And to write an implementation for the interface, can we only do it in the class that we implement the interface or can we do it else where too? Below is my attempt. Is this correct?
Example.
Public interface Tek-tips
{ public int doThis();
public int doThat();
}
public Forum implements Tek-tips
{
int A,B;
public Forum(int X,int Y)
{
A=X;B=Y;
}
public int doThis()
{
return A+B;
}
public int doThat()
{
return A-B;
}
}
How do I display a picture for Applets.And Can I make a standalone .EXE with java?
So in java, does an "interface", only contains function prototypes and not implementation? And to write an implementation for the interface, can we only do it in the class that we implement the interface or can we do it else where too? Below is my attempt. Is this correct?
Example.
Public interface Tek-tips
{ public int doThis();
public int doThat();
}
public Forum implements Tek-tips
{
int A,B;
public Forum(int X,int Y)
{
A=X;B=Y;
}
public int doThis()
{
return A+B;
}
public int doThat()
{
return A-B;
}
}