Writing basic functions in Java

Hello! I am just learning java from basics these days. Can someone guide me here how to write functions in java with demonstrations like function for adding two numbers or function for finding the maximum number in an array which gives rise to another question; how to declare an array in java? Please explain about the prototypes and return types of the functions in your explanation as well. Thank You!
