user defined methods as variable input
Hello everyone.
I'm reading through a teach yourself java programming guide and am a little confused about a couple things when it comes to variables and methods.
I was wondering if it is "legal" to use a method as a variable input. Ex:
variable = usermethod(num1, 23.43, 32.13); /* Assuming the variable and method parameters
are of the same data type */
I was also wondering if you can call a method as output to the stand output such as:
System.out.println(usermethod(num1, 23.43, 32.13));
I think that these are vaild uses but this book is not very clear on this point, it simply says that a user defined method is called from the method main and if it is a return type it will return a value. I assume that the returned value can be store in a variable using the syntax above, am I correct?

