It's just useful for different things. Java is definitely more verbose and has more boilerplate to write, but it's also stricter than Python and is a semi-compiled language, which means that it sometimes catches errors more quickly. It also forces you into an object oriented structure, which tends to encourage you to design your programs better rather than jamming a big list of functions into a single file.
I also find they have strengths in different kinds of applications. I tend to prefer Java for writing games (pygame isn't great), python for doing numerical analysis work (numpy and matplotlib are pretty great), and Fortran, C, or C++ for the big parallel numerical simulations.
It also forces you into an object oriented structure
It doesn't force you to do OO. Yes, it is an OOP language but you can most definitely write procedural code in Java and I'd be willing to bet a novice programmer with no knowledge of OO would end up with a far more procedural application than an OO one. It doesn't force anything. Case in point, the application I support is written in Java and has very little OO structure. It's mostly a tangled mess of procedural code.
199
u/mistaekNot Jan 05 '18
Isn’t java “harder” than python