Image

Imagetragek wrote in Imagejava_dev

Ok, I'm having a little issue right now. What I want to do, is have my arguments returned as type int. To test various hypothesies (there must be a simple way to do this, but I can't find it yet. Perhaps my book's no good here), I've set up this little program:

class Arg {
public static void main(int[] args)
{
int n = args[0];
System.out.println(" " + n);
}
}

It compiles fine, however the java spits on running it, giveing a "java.lang.NoSuchMethod: main" error. (that's not verbatim)

What's going on here? (believe me, I'm as new to this as it sounds.)