public class MethodExample
public static void main(String args)
int y = 2, z = 0;
z = twoTimes(2);
System.out.print("\n\n\t" + (y + z));
public static int twoTimes(int y)
y = 2 * y;
While pursuing a Computer Science degree, I founded DaniWeb.com, an online community for developers and IT professionals. I coded the backend platform from the ground up and I also do all of the advertising sales and SEO. I'm a super-geeky programmer with a passion for Internet marketing.
by the way...when in this comment/area, my keyboard is acting strange, showing equal/signs instead of question-marks, and slashes instead of minus/signs...and so on.
in my browser or java shell all is still ok.
any idea =;
Are you able to help answer this sponsored question?
Questions asked by members who have earned a lot of community kudos are featured in order to give back and encourage quality replies.
write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Amount invested in business
-Amount given to other business partners as loan
-Amount payable to others
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...