This is a topic that you can read about in lots of different places, and it seems that everyone has their own opinion of what functional programming is. There is however, some common ground that you will find in almost every definition, which relates to the benefits you gain from functional programming, such as:
Easier code reuse
Functions are easier to test
Functions are easier to reason about
In order to get these benefits, you need to take into account the following things:
You should think of functions as first class citizens
Functions should minimize side effects (they shouldn't change any state)
Functions should only depend on their parameters (this is called referential transparency)
Lets take a look at two examples of functions (or methods) in Java to illustrate how, even in Java, you can get benefits from writing functions without side effects and context dependency.
public void payRent(BigDecimal amount) { User user = getCurrentUser(); if(user.payAmount...