1
package homework1;

import java.applet.Applet;
import java.awt.Graphics;

public class Homework1A extends Applet {

    public  void paint( Graphics g ){
        g.drawString("CIS 35A Student Learning Outcomes ",40,60);
    }
}

This is the warning that I get

The serializable class Homework1A does not declare a static final serialVersionUID field of type long 
Homework1A.java    /homework1/src/homework1    line 5    Java Problem

also there was another warning like this

Warning: Can't read AppletViewer properties file:

but it disappeared after I run my code a few times.

Roman C
  • 49,761
  • 33
  • 66
  • 176
Khoa Vo
  • 23
  • 1
  • 9
  • How are you compiling and running your code? – Code-Apprentice Oct 08 '12 at 01:56
  • Which IDE are you using? As an aside. Unless specified. 1) Code frames rather than applets. 2) Use Swing rather than AWT. If specified, slap the person who decided that and tell them that they should not be teaching applets, should not be teaching AWT, and should not be teaching, period. – Andrew Thompson Oct 08 '12 at 03:32

1 Answers1

2

You'll need a serial version UID such as: private static final long serialVersionUID = 1L; in your class.

You can use this as reference: Serial IDs

Community
  • 1
  • 1
Russell Gutierrez
  • 1,372
  • 8
  • 19