•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 373,570 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,846 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
A short example of passing variables between methods (functions).
package methodexample; 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; return y; } }
Comments (Newest First)
p.bondam | Newbie Poster | Jan 5th, 2007
•
•
•
•
hi Queen,
this is really a very intriguing example...
what were you thinking at the time=
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 =;
greetings from
peter bondam
this is really a very intriguing example...
what were you thinking at the time=
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 =;
greetings from
peter bondam
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)