In Java, the term "method" is more commonly used because Java is primarily an object-oriented programming language. Methods are associated with classes and objects, and they play a central role in defining the behavior of classes.
While Java supports functional programming constructs (especially with the introduction of lambda expressions in Java 8), the term "function" is not as prevalent in Java as it is in languages like JavaScript or Python, which have stronger support for functional programming paradigms. In Java, you'll mostly encounter the term "method" when dealing with code that follows object-oriented principles.