Then lets conclude he had used a wrong file name :)
Type: Posts; User: iCoder
Then lets conclude he had used a wrong file name :)
so probably it must work. rite ??
What i meant is if he had ran the prg using the correct classname it would have worked.
Assumptions apart. Lets wait if he provides any OP. From that we can...
But he has stated that
I COMPILE THIS BY- javac a.java and run by- java a
so probably it must work. rite ??
then y did his code didn't compile if it's correct ??
By the way thanks i dnt knw that we can give anything after String[].
The error is due to the ar it must be args. -As samfin said.
Correct it, ur code will be working even if its class a or class A or class whatever :)
Create a object for guessing game class
GuessingGame guess = new GuessingGame();
guess.methodname();
length is not a method, use it like a property.
username.length; not as
username.length();
ur method type is void, it means it doesn't RETURN any value.