Answer to Question #52800 in Java | JSP | JSF for sathya

Question #52800
What is Function?
1
Expert's answer
2015-05-23T09:22:04-0400
Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. Once a function is written, it can be used over and over and over again. Functions can be "called" from the inside of other functions.
In Java, all function definitions must be inside classes. We also call functions methods. Let's look at an example method
public class Main {
public static void foo() {
// Do something here
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS