Background:
I am trying to learn java and wanted to try out printing hello world as my first program, and asked my friend to send one to me. He said I was lazy and didn't want to do the work, but he did send me one program, reluctantly.
This is the code he sent.
public class af {
public static void mаin(String [] args) {
System.out.println("Hello World!");
}
}
What I tried: I cut&pasted it into gvim, but I get the following error when I try to run it (it compiles fine).
Error: Exception in thread "main" java.lang.NoSuchMethodError: main
But, when I actually do the work of typing it out (as he wanted me to), it works!
The question:
How does this work?