public static String myMethod(int x) {
if ( x % 2 == 0 ) {
return "even";
}
}
I would like to know what is wrong with my snippet.
>Solution :
You need to throw an exception or give the function a way to terminate.
For example
public static String myMethod(int x) {
if ( x % 2 == 0 ) {
return "even";
}
return "uneven";
}
If you have other errors please edit them in your post.