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 -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -