Java Tech Popularity Index Q1/2024: JVM Languages
Summary for Q1/2024
Here is the scorecard of Java (left) and Scala (right) vs. Kotlin (100%), not on the card. The arrows show the trend vs. Kotlin.
Please take the Kotlin numbers with a huge grain of salt: Most Kotlin development is on Android, not in JVM projects. Java loses to Kotlin in all categories except for jobs. Scala declines against Kotlin in searches and Stack Overflow but holds steady in Udemy Courses. Please see the job ad section for why job numbers for Scala are missing.
Now, let’s look at JVM competitors. Here is Python (left) and Java (right) vs. JavaScript (100%), not on the card. The arrows show the trend vs. JavaScript.
Python and Java hold steady or increase in all categories, except for a slight decline of Java in Stack Overflow.
Here are my recommendations:
- If you need to switch languages or are on a new project:
- Use Scala if you need functional programming.
- Use Kotlin if you really need a “more modern Java”.
- Otherwise, use Java 17.
Archive
2023 | Q4 | Q3 | Q2 | Q1 | ||||
2022 | Q4 | Q3 | Jun | May | Apr | Mar | Feb | Jan |
2021 | Dec | Nov |
Table Of Contents
Choices
Here are the choices in alphabetical order:
Please note that most Kotlin development is on Android, not on JVM projects. I am unable to quantify that effect.
Popularity
Why Popularity - and How?
Picking a popular technology makes our developer life easier: Easier to learn, easier to build, debug & deploy, easier to find jobs/hire, and easier to convince teammates & bosses. Popularity can make a difference in two situations: When multiple technologies score similarly, we could go for the most popular one. And when a technology is very unpopular, we may not use it.
I measure popularity among employers and developers as the trend between competing technologies. I count mentions in job ads at Indeed for employer popularity. For developer popularity, I use Google searches, Udemy course buyers, and Stack Overflow questions.
Employers: Job Ads
The Indeed job search is active in 62 countries. I picked 59 countries representing 69% of the worldwide GDP in 2022, excluding three countries because English word searches proved ineffective there: China, Japan, and South Korea. It demonstrates the willingness of organizations to pay for technology - the strongest indicator of popularity in my mind. Kotlin is the baseline. The chart is not proportional, so all languages fit nicely.
I exclude Scala because I over-counted it in the past: Searching for “scala” in a job ad also matches “scalable”. And in some countries, “scala” is not just a programming language: The Netherlands had 7,000 mentions of Scala – more than the US. I plan to add Scala back in a future index update.
I’ve also only estimated the number of Java ads since January 2023. Searching for “Java” also matches “JavaScript”. And I cannot search for ads mentioning “Java” and “JavaScript” at Indeed. So I search for ads with “Java” and without “JavaScript” and then added 20% as the estimate for ads that mention both. I may refine this in future index updates.
There are no job numbers for May and December 2023 because of changes on the Indeed websites.
Java wins, Kotlin is second, and Groovy is third. Java has the most jobs by an order of magnitude and pulls away from Kotlin again after a considerable drop. As described above, Scala isn’t on the list but would be #3. So Groovy is #3 for now, with a two-month dip against Kotlin. Clojure is a niche language, dropping from 7% of Kotlin to 4% since October 2021.
Let’s look at how the JVM competition does.
The number of job ads for Go is too low. Why? Because the word “go” most often does not refer to the programming language, I only search for variations of “golang”. I may refine this in future index updates. There are no job numbers for May and December 2023 because of changes on the Indeed websites.
Python wins, JavaScript places second, Java is third, and C# is fourth. All languages gained against JavaScript at the end of 2023. And except Go, all hit their peak value in November last year. Python leads JavaScript by 15%. Java oscillates around 1.4:1. Even Java beat JavaScript by 5%, while C# hit nearly two-thirds of JavaScript. Good ol’ C++ still commands 60% of JavaScript mentions. After flatlining at 8% of JavaScript, Rust rose to 10%. As described above, the numbers for Go are too low but steady.
Comparing November 2023 vs. November 2022, job ads are down 32%.
Please see here for details, caveats, and adjustments to the job ad mentions.
You can find the detailed search results with links here. They include breakdowns by continents:
Developers
Students at Udemy
Udemy is one of the biggest online learning sites. They publish the number of people who bought a course (beyond a certain threshold, possibly around 100k). This shows how many people evaluate a technology. Kotlin is the baseline.
Java wins by an order of magnitude, Kotlin is second, and Scala is third. After a short growth period in early 2023, Java is sliding again against Kotlin. Scala loses very slowly to Kotlin. Groovy and Clojure don’t have enough students to cross the display threshold.
Here are the links that show the courses for all and the number of students for some:
Here are the number of students for languages that compete with the JVM:
Python wins, JavaScript is second, Java is third, C# is fourth, and Go is a distant number five. Python has more than 42 million students — three times as many as Java. And since June 2022, it has had 3.5 times as many new students. And Python still gains shares on JavaScript. Java has been at 91% or 92% of JavaScript since July 2022. Java leads C#, its old rival, 2.2:1. TypeScript is stuck at 10% of its big sibling, JavaScript. Go, the new kid on the block, seems stuck at 6% of JavaScript.
Here are the links that show the courses and number of students for all:
Google Searches
Google Trends demonstrates the initial interest in a technology over time. “More searches = better” to me. The percentage behind the current value is the drop-off from the peak value, marked with a circle.
Google changed its measurement algorithms on January 1, 2016, and January 1, 2022. That caused spikes for all values, especially in 2022.
Even at 1/8 of its peak interest in 2004, Java still beats Kotlin 12:1. Here is the chart link.
To get a better picture of the Java alternatives, here they are without Java (chart link):
Among the Java challengers, Kotlin wins, Scala is second, Groovy is third, and Clojure is last. Google searches always decline in December. Scala’s fall and Kotlin’s rise both started in 2016. Kotlin and Scala have dropped since early 2022, but Kotlin still leads Scala 4:1. Groovy has declined since 2018, and Clojure since 2014.
Here are searches for the languages that compete with the JVM (chart link):
Here are the same JVM competitors over the last three years (chart link):
Python wins, Java is second, JavaScript is third, C# is fourth, and Go is fifth. Google searches always decline in December. All languages have dropped since early to mid-2022. Python leads JavaScript and Java 1.7:1. After being neck-to-neck with JavaScript, Java is now tied with Javascript. C# has 38% of JavaScript’s search volume and hasn’t gained shares in the last three years. Go gained slightly against C#.
Monthly Questions at Stack Overflow
We can run database queries against the questions, answers, and comments at Stack Overflow with the StackExchange Data Explorer. The number of monthly questions is a proxy for using a technology during evaluation and productive use. This number includes deleted questions to be more accurate, as Stack Overflow automatically deletes questions without answers after a year. “More questions = better” to me. The percentage behind the current value is the drop-off from the peak value, marked with a circle.
Java wins, Kotlin is second, and Scala is third. Java has lost 85% of its questions after peaking nine years ago. Kotlin declines much slower and now has 23% of Java’s questions. Scala dropped to 7% of its peak value from 6.5 years ago. Groovy and Clojure have always hovered just above zero.
You can run the queries below at the StackExchange Data Explorer.
(Click to expand) Query 1: Clojure and Groovy
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-12-31';
WITH Tagged AS (
SELECT
Id,
CreationDate,
CASE WHEN CHARINDEX('<java>', Tags) > 0 THEN 1 ELSE 0 END AS JavaTag,
CASE WHEN CHARINDEX('<kotlin>', Tags) > 0 THEN 1 ELSE 0 END AS KotlinTag
FROM PostsWithDeleted
WHERE
PostTypeId = 1 AND -- 1 for
CreationDate >= @StartDate AND
CreationDate <= @EndDate
),
MonthlyCounts AS (
SELECT
DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
SUM(JavaTag) AS Java,
SUM(KotlinTag) AS Kotlin
FROM Tagged
GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
Month,
Java,
Kotlin
FROM MonthlyCounts
ORDER BY Month;
(Click to expand) Query 2: Java, Kotlin, and Scala
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-12-31';
WITH Tagged AS (
SELECT
Id,
CreationDate,
CASE WHEN CHARINDEX('<scala>', Tags) > 0 THEN 1 ELSE 0 END AS ScalaTag,
CASE WHEN CHARINDEX('<groovy>', Tags) > 0 THEN 1 ELSE 0 END AS GroovyTag,
CASE WHEN CHARINDEX('<clojure>', Tags) > 0 THEN 1 ELSE 0 END AS ClojureTag
FROM PostsWithDeleted
WHERE
PostTypeId = 1 AND -- 1 for
CreationDate >= @StartDate AND
CreationDate <= @EndDate
),
MonthlyCounts AS (
SELECT
DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
SUM(ScalaTag) AS Scala,
SUM(GroovyTag) AS Groovy,
SUM(ClojureTag) AS Clojure
FROM Tagged
GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
Month,
Scala,
Groovy,
Clojure
FROM MonthlyCounts
ORDER BY Month;
Here are the shares of questions for the languages that compete with the JVM:
Python wins, JavaScript is second, Java third, C# is fourth, TypeScript fifth, and Go is sixth. Python and JavaScript have fallen sharply since ChatGPT, Java and C# less so. Python still leads JavaScript 1.5:1 at 25% of its peak value from early 2020. At just 22% of its 2016 peak, JavaScript leads Java 1.6:1. At 85%, Java has the most significant decline. C# has gained on Java since 2022 and has 851988/7349% of Java’s questions. TypeScript’s seven-year rise ended mid-2022, leaving it at 27% of JavaScript’s questions. Go has been low and steady for about seven years, still leading only to 7% of JavaScript’s numbers.
You can run the queries below at the StackExchange Data Explorer. I used two queries to get the number of monthly questions for the JVM competitors because putting all in one query timed out.
(Click to expand) Query 3: Java, JavaScript, and TypeScript
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-12-31';
WITH Tagged AS (
SELECT
Id,
CreationDate,
CASE WHEN CHARINDEX('<java>', Tags) > 0 THEN 1 ELSE 0 END AS JavaTag,
CASE WHEN CHARINDEX('<javascript>', Tags) > 0 THEN 1 ELSE 0 END AS JavascriptTag,
CASE WHEN CHARINDEX('<typescript>', Tags) > 0 THEN 1 ELSE 0 END AS TypeScriptTag
FROM PostsWithDeleted
WHERE
PostTypeId = 1 AND -- 1 for
CreationDate >= @StartDate AND
CreationDate <= @EndDate
),
MonthlyCounts AS (
SELECT
DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
SUM(JavaTag) AS Java,
SUM(JavascriptTag) AS Javascript,
SUM(TypeScriptTag) AS TypeScript
FROM Tagged
GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
Month,
Java,
Javascript,
TypeScript
FROM MonthlyCounts
ORDER BY Month;
(Click to expand) Query 4: C#, Go, and Python
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-12-31';
WITH Tagged AS (
SELECT
Id,
CreationDate,
CASE WHEN CHARINDEX('<c#>', Tags) > 0 THEN 1 ELSE 0 END AS CsharpTag,
CASE WHEN CHARINDEX('<go>', Tags) > 0 THEN 1 ELSE 0 END AS GoLangTag,
CASE WHEN CHARINDEX('<python>', Tags) > 0 THEN 1 ELSE 0 END AS PythonTag
FROM PostsWithDeleted
WHERE
PostTypeId = 1 AND -- 1 for
CreationDate >= @StartDate AND
CreationDate <= @EndDate
),
MonthlyCounts AS (
SELECT
DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
SUM(CsharpTag) AS Csharp,
SUM(GoLangTag) AS GoLang,
SUM(PythonTag) AS Python
FROM Tagged
GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
Month,
Csharp,
GoLang,
Python
FROM MonthlyCounts
ORDER BY Month;
Please note that the overall monthly number of Stack Overflow questions is down 55% since ChatGPT appeared (November 2022 vs. March 2024):
You can run the query below at the StackExchange Data Explorer.
(Click to expand) Query 5: All Questions
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2024-03-31';
WITH Questions AS (
SELECT
Id,
CreationDate,
1 AS AQuestion
FROM PostsWithDeleted
WHERE
PostTypeId = 1 AND
CreationDate >= @StartDate AND
CreationDate <= @EndDate
),
MonthlyCounts AS (
SELECT
DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
SUM(AQuestion) AS Questions
FROM Questions
GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
Month,
Questions
FROM MonthlyCounts
ORDER BY Month;
Analysis
- The usage of Java still dominates its alternatives, often by an order of magnitude.
- Java’s evolution speed has increased. So, staying with Java makes life easier for us developers.
- Starting with Java 21 in September 2023, we’ll get a new Java LTS every two years instead of every three years. This will accelerate Java improvements.
- Kotlin is the best Java alternative. Kotlin’s rise in popularity is partly fueled by its status as the default language for Android development.
- Scala lost its position as the #2 JVM language. Scala requires knowledge of functional programming, which is less common than object-oriented one. You must use Scala if you need functional programming on the JVM. In job ads, it’s probably behind Kotlin. Google searches and Stack Overflow questions trend towards Kotlin. That’s why Scala is #3 for me.
- Groovy is a has-been on the JVM: Kotlin stole its place of “better Java”, while Grails (Ruby-on-Rails with Groovy on the JVM) has fallen out of favor. Even Gradle now defaults to Kotlin.
- Clojure fills the niche of “Lisp on the JVM”.
Here’s my recommendation:
- On your current project, keep your existing language unless that language is absolutely, really not working out for you.
- If you need to switch languages or are on a new project:
- Use Scala if you need functional programming.
- Use Kotlin if you really need a “more modern Java”.
- Otherwise, use the latest Java LTS version you, your team, and your application can stomach.
Next Issue
The next issue will arrive in June 2024. Subscribe to it as a newsletter to have it in your inbox then!