vendredi 23 septembre 2016

Methods with return values; return in an if statement

I'm trying to return a method (a part of my task is methods with return values): static String svar(), in an if statement. If the user types in a number matching one in my .txt, I want it to return String svar().

My fifth week in school learning programming, so how do I do this? The error I get when running the program is:

incompatible types: unexpected return value return svar();

Aucun commentaire:

Enregistrer un commentaire