🌐
DEV Community
dev.to › clouddevloper › python-vs-java-which-is-best-language-for-2022-1odj
Python vs Java: Which is Best Language for 2022 - DEV Community
December 23, 2021 - Despite its declining popularity it's still a great language for 2022. Python Vs. Java: Bracing Web Frameworks for Development The web development frameworks for Python include Django and Flask that provide the basics of functionality without many routing requests or excessive cost.
🌐
Hackr
hackr.io › home › articles › programming
Python vs Java: Which is Best in 2026?
January 30, 2025 - According to Github’s Octoverse, Java was the third most used language on Github followed behind JavaScript and Python. In Stackoverflow’s 2022 developer survey, Python was the third most popular language behind JavaScript and HTML/CSS.
Discussions

Is a good choice Java in 2022?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full - best also formatted as code block You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnjava
51
55
April 7, 2022
-🎄- 2022 Day 7 Solutions -🎄-
Rust 2022 Day 07 Burnt a lot of time and sanity trying to build a traditional tree in rust. In the end I used a solution similar to an ArenaTree, a Vector of directories with the index of the parent. Inspired by u/raui100 More on reddit.com
🌐 r/adventofcode
1257
89
December 7, 2022
-🎄- 2022 Day 5 Solutions -🎄-

Python. Part 1, Part 2

Time to break out the regular expressions (for input parsing). This is also where I learned that if you're reading line by line with fileinput, you can't stop and resume processing in a second loop. It's all gotta be done in a single for loop. So, I turned what would've been two simple loops into one loop with a state variable, which calls one of two different functions depending on which state we're in.

Crate stacks are stored as lists. So, it's a list slicing day.

In part 1 I initially had the wrong answer because I thought we were grabbing all the crates at once and preserving that list. Turns out I had to reverse the list first. And then for part 2, don't reverse it. (My initial solution for part 1 would've been right for part 2.) So once again, part 2 is simpler than part 1.

Also learned that you can't have a variable named "from" in Python.

More on reddit.com
🌐 r/adventofcode
1343
88
December 18, 2022
-🎄- 2022 Day 2 Solutions -🎄-
Okaay, I'm a beginner, I just started learning javascript in september this year. No previous programming / coding experience before, ZERO. I'm going slow at my own pace but I'm trying, i did what made more sense to me for my level hehe... so: first part: const smallInput = ****here goes the input***; let regex1 = / /g; function deleteSpaceBetweenLetters(textInput) { let noSpaces = textInput.replace(regex1, ""); return noSpaces; } const inputWithoutSpaces = deleteSpaceBetweenLetters(smallInput); // console.log(inputWithoutSpaces); let textToArray = inputWithoutSpaces.split("\n"); // console.log(textToArray); // puntos const A = 1; const B = 2; const C = 3; const X = 1; const Y = 2; const Z = 3; const DRAW = 3; const WIN = 6; let oponentMovePoints = 0; let myMovePoints = 0; function determineWinner(array) { for (let i = 0; i < array.length; i++) { if (array[i] ==="AX") { console.log("It's a draw"); oponentMovePoints += A + DRAW; myMovePoints += X + DRAW; } if (array[i] ==="AY") { console.log("Y wins"); oponentMovePoints += A; myMovePoints += Y + WIN; } if (array[i] ==="AZ") { console.log("A wins"); oponentMovePoints += A + WIN; myMovePoints += Z; } if (array[i] ==="BX") { console.log("B wins"); oponentMovePoints += B + WIN; myMovePoints += X; } if (array[i] ==="BY") { console.log("It's a draw"); oponentMovePoints += B + DRAW; myMovePoints += Y + DRAW; } if (array[i] ==="BZ") { console.log("Z wins"); oponentMovePoints += B; myMovePoints += Z + WIN; } if (array[i] ==="CX") { console.log("X wins"); oponentMovePoints += C; myMovePoints += X + WIN; } if (array[i] ==="CY") { console.log("C wins"); oponentMovePoints += C + WIN; myMovePoints += Y; } if (array[i] ==="CZ") { console.log("It's a draw"); oponentMovePoints += C + DRAW; myMovePoints += Z + DRAW; } } return "The end" }; const results1 = determineWinner(textToArray); console.log(results1); console.log(); console.log("The oponent's total amount of points is:"); console.log(oponentMovePoints); console.log("My total amount of points is:"); console.log(myMovePoints); second part - only showing the changes : (i just copypasted what i had into another file and adjusted it. I'm sure everything can be done in the same file but i had no clue, so i did what i could :P ) const rock = 1; const paper = 2; const scissors = 3; function determineWinner(array) { for (let i = 0; i < array.length; i++) { if (array[i] ==="AX") { console.log("I lose. I need scissors"); oponentMovePoints += A + WIN; myMovePoints += scissors; } if (array[i] ==="AY") { console.log("It's a draw. I need rock"); oponentMovePoints += A + DRAW; myMovePoints += rock + DRAW; } if (array[i] ==="AZ") { console.log("I win. I need paper"); oponentMovePoints += A; myMovePoints += paper + WIN; } if (array[i] ==="BX") { console.log("I lose. I need rock"); oponentMovePoints += B + WIN; myMovePoints += rock; } if (array[i] ==="BY") { console.log("It's a draw. I need paper"); oponentMovePoints += B + DRAW; myMovePoints += paper + DRAW; } if (array[i] ==="BZ") { console.log("I win. I need scissors"); oponentMovePoints += B; myMovePoints += scissors + WIN; } if (array[i] ==="CX") { console.log("I lose. I need paper"); oponentMovePoints += C + WIN; myMovePoints += paper; } if (array[i] ==="CY") { console.log("It's a draw. I need scissors"); oponentMovePoints += C + DRAW; myMovePoints += scissors + DRAW; } if (array[i] ==="CZ") { console.log("I win. I need rock"); oponentMovePoints += C; myMovePoints += rock + WIN; } } return "The end" }; More on reddit.com
🌐 r/adventofcode
1500
103
December 6, 2022
People also ask

Which Pays More, Java or Python?
As we described earlier, the salary ranges for both Java and Python are about the same. Python is marginally better paying. Python pays a median of $97,000, while Java pays a median of $96,000 in the US.
🌐
hackr.io
hackr.io › home › articles › programming
Python vs Java: Which is Best in 2026?
Which is Better, Java or Python?
Neither programming language is better, per se. They each have their advantages and disadvantages, so it really depends on what you want to build and your career goals.
🌐
hackr.io
hackr.io › home › articles › programming
Python vs Java: Which is Best in 2026?
Should I learn Java or Python First?
If this would be your first programming language, then you should pick Python. It’s much easier to learn, and the job opportunities and salary figures are comparable.
🌐
hackr.io
hackr.io › home › articles › programming
Python vs Java: Which is Best in 2026?
🌐
Quora
quora.com › Should-I-learn-Java-or-Python-for-careers-in-2022
Should I learn Java or Python for careers in 2022? - Quora
Answer (1 of 4): there is a trap, python is very popular in areas where other skills are primary, e.g. you will not get data engineer job only by learning python. I think “pure” developer jobs are still more available when you know java. if you are already an expert in sciences, like math, stat, ...
🌐
LinkedIn
linkedin.com › pulse › python-java-which-better-learn-programming-2022-upsofttechnologies
Python or Java? Which is better to Learn Programming in 2022?
December 10, 2021 - Speed, which is a crucial thing on enterprise-level application development, Java is faster than Python, but do remember that you need to compile and run Java program, while Python doesn’t need to be compiled.
🌐
MakeUseOf
makeuseof.com › home › programming › python vs. java: the best language for 2023
Python vs. Java: The Best Language for 2023
September 14, 2023 - Data science: Which programming language is every data scientist's favorite? Python is straightforward, especially for beginners: what you see is what you get. Its syntax is simple and it’s a good, all-purpose language.
🌐
IP Address Lookup
iplocation.net › which-one-is-the-best-to-choose-in-2022-java-vs-python-vs-dot-net
Which one is the best to choose in 2022: Java vs. Python vs .Net
August 4, 2022 - As per the Stack Overflow Survey Result 2022, developers and professionals prefer Python (43.51%) more compared to Dot Net (36.41) and Java (33.4%). One of the essential things to know before finalizing a programming language is whether it supports multiple languages or not.
🌐
Trio
trio.dev › blog › python-vs-java
Python vs. Java in 2022: Side-by-Side Comparison | Trio Developers
August 14, 2020 - Java, with the aide of its JIT compiler, has a natural advantage over Python in this regard. What’s more, although interpreted languages can provide an environment to debug-as-you-go, so to speak, certain runtime errors that have to do with type checking and conversion will be left completely vulnerable. Parsing through such errors will indubitably take time – time that Java developers can use more efficiently. TL;DR: Java wins...
Find elsewhere
🌐
Upgrad
upgrad.com › home › blog › software development › python vs java: mastering the best language for your career
Python vs Java: Which Language to Learn For Your Career?
October 9, 2025 - Automation and Scripting: Python is perfect for writing simple scripts to automate repetitive tasks, from organizing files to scraping data from websites. Rapid Prototyping: Startups love Python because it allows them to build and test ideas (MVPs) faster than almost any other language. ... Java’s performance, security, and scalability have made it the backbone of the corporate tech world.
🌐
Rootstack
rootstack.com › en › blog › python-vs-java
Python vs Java: Which one should I use in 2022? | Rootstack
Due to how easy Python is to learn, being a complete general-purpose programming language, it gained the favor of many people outside the development world who only wanted to automate their activities in their respective fields, for this much of the AI ​​development it is done with python. Java, on the other hand, is a good option for machine learning, being easy to debug and to use on a larger scale, being used in most cases for enterprise-grade applications. In summary, each programming language has its advantages and disadvantages, here we present the main aspects so that you can decide which one is best for you when choosing the framework with which you are going to develop your application or website.
🌐
KeyUA
keyua.org › blog › java-vs-python-in-depth-comparison
Java vs Python: In-Depth Comparison for 2022 | KeyUA
October 13, 2020 - Programmer’s Productivity. Python comes with extensive support libraries and a well-made object-oriented design. Due to this, the programmer’s productivity can be significantly increased while using languages like VB, C, C#, C++, Perl, and, of course, Java.
🌐
JayDevs
jaydevs.com › python-vs-java
Python vs Java 2024: the Ultimate Showdown for Business Applications
April 8, 2024 - Comparing Python vs Java in StackOverflow surveys demonstrates how 43.51% of professional developers reported using Python regularly in 2022, while Java was used by 33.4% of programmers.
🌐
Coursera
coursera.org › coursera articles › computer science and engineering › web and app development › python vs. java: which should i learn?
Python vs. Java: Which Should I Learn? | Coursera
September 12, 2025 - In this article, we compare Python and Java, two programming languages used by developers around the world. We'll show you why one language might be better suited for certain tasks.
🌐
Raygun
raygun.com › blog › java-vs-python
Java vs Python: Code examples and comparison · Raygun Blog
November 30, 2022 - At the time of writing, Python 3.11 is the most recent version, with only 3.x versions still supported. The third and most recent LTS, Java 17, was released September 2021. Oracle Java SE Support Roadmap states that versions 17, 11 and 8 are ...
🌐
Revelo
revelo.com › blog › python-vs-java
What are the Differences Between Python and Java?
Unsurprisingly, many developers prefer Python. According to the TIOBE Index for August 2022, Python is now the hottest programming language, with C and Java in second and third place, respectively.
🌐
DRC Systems
drcsystems.com › blogs › python vs. java: which one will shape 2022?
Python vs. Java: Which One Will Shape 2022? - DRC Systems
October 24, 2025 - This programming language used to be the most widely used server-side language. With advancements Java gained popularity and presence among the developers and now offers a lot of support. Just like Python, Java programming can be easy because of the libraries.
🌐
Medium
medium.com › @botreetechnologies › java-vs-python-a-programming-language-comparison-for-2022-38addce30910
Java vs. Python: A Programming Language Comparison for 2022 | by BoTreeTechnologies | Medium
January 4, 2022 - As of 2021, Python is the third most used programming language with a market share of 48.24%, while Java is the fifth most programming language with a market share of 35.35%. Since the integration of modern technologies like Machine Learning, Big Data, Data Analytics, AR & VR, IoT, and more, both Java and Python application development have shown substantial growth and continue to captivate enterprises for software solutions. Read more: Why is Java Application Development Popular in 2022
🌐
Monterail
monterail.com › blog › development
Python vs. Java - When to Use Each Language | Monterail
StackOverflow Survey from 2022 · The same languages with the exception of SQL are the most popular languages for people learning to code, though people learning to code are more likely than Professional Developers to report using Python (58% vs. 44%) which suggest that they consider it a very promising technology. On the other hand, Java seems entrenched in its strong position as the language beloved by large-scale applications, so it would be difficult to replace it soon.
🌐
Medium
medium.com › javarevisited › java-vs-python-what-are-the-key-differences-in-2023-6eeea01a5a2f
Java vs Python: What are the Key Differences in 2023? | by A Smith | Javarevisited | Medium
September 26, 2022 - Compared to Java, Python has a less complex and comprehensible syntax and is easy to remember and apply. Its easy syntax makes for better code readability. The indentation matters though.
🌐
ActiveState
activestate.com › home › blog › python tops java as world’s most popular programming language
Python Tops Java As World's Most Popular Programming Language
October 20, 2022 - Interpreted languages, java, learn ... · For the first year ever, Python has topped the TIOBE list of popular programming languages, which also lists Java as having dropped to the #3 slot: Source: www.tiobe.com ·...
🌐
Imaginary Cloud
imaginarycloud.com › blog › python-vs-java
Python vs Java: Key Differences, Performance, and Use Cases
2 weeks ago - When it comes to machine learning, Python is generally considered the more accessible and mature ecosystem, thanks to its extensive libraries, active community, and seamless integration with GPU-accelerated tools.