0
what is wrong in the codes. i would appreciate any help.
public class Program { public static void main(String[] args) { int res = test(45); System.out.print(res); } static void test(int x) { return int x+98; } }
1 Answer
+ 1
Shobbit,
You have mistyped the return type of your test method it must be "int" instead of "void". and
just write return x+98;