JAVA Applet ( does not declare a static final serialVersionUID field of
type long)
I just began learning Java programming. I made this one program given in
the first chapter on Applets (The applet class) and it gave me this
error.I tried to find a solution but couldn't. According to the book this
program should display a window but i get this error when i extend the
Applet class :
"Multiple markers at this line - The serializable class AppletSkel does
not declare a static final serialVersionUID field of type long - The
public type AppletSkel must be defined in its own file "
Heres my code;
//An Applet Skeleton
import java.awt.*;
import java.applet.*;
/*<applet code="Appletskel" width=300 height=100>
</applet>*/
//ERROR
public class AppletSkel extends Applet {
public void init(){
}
public void start() {
}
public void stop(){
}
public void destroy() {
}
public void paint(Graphics g){
}
Please help me, i am stuck here.
No comments:
Post a Comment