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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -