But, don't other programming languages have these features too?
Yes and no. One of Java's most prominent features is platform independence, and how easy it is to run Java on any device. Not all programming languages have this, or if they do, it may not be as easy to implement.
Java was also released at arguably the perfect time. The number of computers in homes were growing quickly, and Java made it easy to write, run, and maintain programs. AKA, it made it easy for companies to release software. We don't have the stats, but essentially, Java's popularity exploded because it was easy to use. It was also an early player in the Object Oriented Programming (OOP) game, which made it even easier to create large applications compared to older, non-OOP languages.
So, why is Java still popular? There's no perfect answer here, but here are a few reasons:
- It became popular during the initial software boom, and there was no reason for it to lose popularity. It continued to be easy to write and maintain.
- Once it became popular, it was taught in schools --> Computer Science students learned Java --> they got jobs in Java --> this maintained Java's popularity --> it's still popular, so it's still taught in schools --> repeat..
- It has a very mature ecosystem of libraries and free learning resources
- It also has a very mature network of enterprise frameworks, like Java EE and Spring.
- It's popular, so it's considered trustworthy. Companies might not want to risk using the "latest and greatest" language that may have bugs and other issues.
- It's maintained by Oracle, a corporation with huge market capitalization. So, it has a lot of maintaining and improving it.