Question: what is the difference between method and function in java?
Answer: Method and function are the same thing but their are minor difference between them. these difference are : function return some value but method doesn't return anything . Function have independent existence which means they are defined outside the class.