main - Testing a method in Java -
i'm newbie.i'm trying test method in jgrasp compiler gives errors.what missing here?thanks.
public class assignment1a { public static void main(string[] args){ system.out.println(twicesum(5,10)); } } public static int twicesum(int x, int y){ int result = 2 * (x + y); }
did remember return
method's result?
also, seeing how you're coding in java, shouldn't twicesum()
member of assignment1a
class?
Comments
Post a Comment