|
Did you read about "void" and "return" methods,and how they work?
So,when you wanna only print the square root of z so use "public void nameOfMethod(@params)" to declare the method,but if you want just to make the method which will return some type of variable and then somewhere you will use it so declare as "public..." +what type of variable or object you want to return+"nameOfMethod(@params)"
Last edited by serjant : 07-02-2008 at 01:37 AM.
|