But of course, nothing in Java forces you to use state and side effects.
Just because you aren't forced doesn't mean the language doesn't encourage particular styles based on the tools available.
If a library is designed with the "create object, set initial properties, call methods that alter the properties, retrieve the new properties" paradigm in mind where everything has its own custom structure, then wrapping the whole process in a function that returns standard abstract data structures (lists, hashes, sets) is going to be extra work. Valuable work, perhaps, but many programmers are not going to bother. On the other hand, if the library is designed with "pass arguments, return abstract data structure" then writing other functions in a similar manner will be natural.
Comments
But of course, nothing in Java forces you to use state and side effects.
Just because you aren't forced doesn't mean the language doesn't encourage particular styles based on the tools available.
If a library is designed with the "create object, set initial properties, call methods that alter the properties, retrieve the new properties" paradigm in mind where everything has its own custom structure, then wrapping the whole process in a function that returns standard abstract data structures (lists, hashes, sets) is going to be extra work. Valuable work, perhaps, but many programmers are not going to bother. On the other hand, if the library is designed with "pass arguments, return abstract data structure" then writing other functions in a similar manner will be natural.