Subj : Re: java error To : comp.programming From : blmblm Date : Wed Jul 27 2005 01:00 am In article <1122415747.104124.301350@o13g2000cwo.googlegroups.com>, wrote: >I've just started programming in java and when I try to compile the >hello world program that came off of the java tutorial and it gave me >the following error: > >helloworldapplet.java:8: class HelloWorld is public, should be declared >in a file named HelloWorld.java Is your code in a file named HelloWorld.java? If not, it (probably) won't compile. A better newsgroup for your question is probably comp.lang.java.help. >public class HelloWorld extends Applet { > ^ >1 error > >Here's the code for that program: > >import java.applet.*; >import java.awt.*; > >/** > * The HelloWorld class implements an applet that > * simply displays "Hello World!". > */ >public class HelloWorld extends Applet { > public void paint(Graphics g) { > // Display "Hello World!" > g.drawString("Hello world!", 50, 25); > } >} > -- | B. L. Massingill | ObDisclaimer: I don't speak for my employers; they return the favor. .