A
A
Alexey R2014-03-29 16:00:18
Java
Alexey R, 2014-03-29 16:00:18

Hello World can't find the class, what should I do?

Previously, everything worked, but now, for some reason, Hello Word does not start. I'm already tired, as I sit down to teach, so for 3 hours I can't start something. My code is like this

public class main {
  public static void hello(String args[]) {
    System.out.println("Hello World");
  }
}

But when I start, I get the following result . NCcI6bNaLR8GM
After that, it’s QNf1GQmsLR8G9
Yes, and it’s generally not clear why Application & Applet appear when, as far as I remember, when the Run button is pressed, the class that you want to run should be highlighted.
I tried to do the same through the command line, I got this yadi.sk/d/7q54rmZ4LR7Gx
I don’t even know what to do now.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
ProkletyiPirat, 2014-03-29
@Axeles

public class Hello{
  public static void main(String args[]) {
    System.out.println("Hello World");
  }
}

but in Russian it says "I can't find the main method in the class, please define the method public static void main(String args[]) " (learn to use at least google translator)
but in general take a book on java for example: author Kay Horstman Tom 1 and volume 2 and learn java well

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question