This error is driving me nuts.I've just got back to using Java again, after half a year or so, and now I can't seem to compile this very simple project.
I cannot add items (strings) to an ArrayList. I get the compile error ''Staafdiagram.java uses unchecked or unsafe operations.".
Can anyone help me with this?
Code:import java.awt.*; import java.applet.*; import java.awt.event.*; import java.util.*; public class Staafdiagram extends Applet { public void paint(Graphics g) { ArrayList uni; uni = new ArrayList(); uni.add("abc"); } }




I've just got back to using Java again, after half a year or so, and now I can't seem to compile this very simple project.
Reply With Quote