Java – What are the most common programming mistakes PHP programmers make in Java

comparisonjavaPHPsyntax

I am more practiced in PHP than in Java, and when I use Java I find myself looking at it from a PHP perspective. This can cause trouble, so I'd like to know, what are the most common programming mistakes PHP programmers make in Java?

Best Answer

Perhaps slightly flippant, but after bingeing on PHP for many years (it pays the bills), I've often been happy to be able to use crazy things like enumerated types and native data types that aren't arrays/objects playing dress-up.

Whilst a sweeping generalisation (the best ones always are), I guess what I'm getting at is that perhaps the most common mistake is to remain in the PHP mindset and not take advantage of the features that the language offers.