Why does this code displays an error?
I'm using a pretty old Java book to learn Java. It's from 2000 so I think it's a bit outdated... I hope not....
Anyway, I installed the JDK and all that stuff, tested the compiler and the book says that I have to run the following code:
However, when I run this code, it displays an error:
public class ToonJavaBoodschap extends Applet
public void paint (Graphic g)
g.drawString("Volle kracht vooruit met Java!", 5, 25);
''ToonJavaBoodschap.java:?: cannot find symbol
symbol: class Graphic
location: class ToonJavaBoodschap
public void paint <graphics g>
What am I doing wrong? Is it also possible that this example from this book is outdated and that something is different nowadays? Do you guys also recommend me to read this Java book which was written & published in 2000. :(sweat):