Java is very fast. Java is very secure. Java has a gazillion of great code libraries. Java has static typing to save you from stupid coding errors. Java does not use whitespace for logic. need more? Answer from team_broccoli on reddit.com
🌐
Reddit
reddit.com › r/learnpython › "python vs. java in 2025: which should i focus on?"
r/learnpython on Reddit: "Python vs. Java in 2025: Which Should I Focus On?"
December 10, 2024 -

It's 2025, and I'm at a decision point in my programming journey. I want to dive deep into one language and can't decide between Python and Java.

Here's my context: i am a developer with 10 year experience in java and 5 years in python

  • Python: It's dominating fields like AI/ML, data science, web development, and automation. With its growing libraries and frameworks, it feels like a must-know for cutting-edge tech.

  • Java: Despite being older, it's still a powerhouse for enterprise systems, Android development (with Kotlin in the mix), and large-scale backend solutions. Its stability and performance are undeniable.

🌐
Reddit
reddit.com › r/learnprogramming › suggestion: should i learn python or java?
r/learnprogramming on Reddit: Suggestion: should I learn python or java?
August 3, 2024 -

Hi! I'm a junior DevOps engineer and I would like to start developing backend too. I already know intermediate python and worked a little bit with django and I would like to dive deep into python and learn it well.

I asked my supervisor for his advice and he thinks that it's better for me to learn Java first. From his point of view Java is more technical and I can become a better developer by learning the fundamentals with it (like polymorphism, interfaces, data types). He considers python as an uneffective shortcut to learn bad software development practices.

At first he convinced me with his argument but then I documented myself better and I saw that even python has all of those concepts, so I feel like if I'm not lazy and l study python well I can achieve the same expertise I would get with Java.

Since I want python to be my main language I'm essentially very skeptical in using my energies in learning java from zero while I could dive deep in python and get solid with it. It's not like I only want to know python overall, but reading a book of 1600 pages like "learning python" takes time and effort and I feel like I want to make that effort on python, not java.

What do you think about it? I could really use your advice, thanks a lot in advance.

🌐
Reddit
reddit.com › r/learnprogramming › i have to choose either c#, java, or python for my degree course.
r/learnprogramming on Reddit: I have to choose either C#, Java, or Python for my degree course.
March 13, 2023 -

Hi all. I will be doing a software engineering degree, however I have to elect which of three languages ( C#, Java, or Python) I would like to specialize in.

I will be doing a Python course through the University of Michigan via Coursera leading up to this.

I would just like some advice from individuals and professionals that have experience in the industry, if you had a choice of these three languages, which would you say will be the most in demand/valuable for the foreseeable future.

I appreciate your time. Thanks

🌐
Reddit
reddit.com › r/learnprogramming › which programming language one should focus on for future demand: java or python?
r/learnprogramming on Reddit: Which programming language one should focus on for future demand: Java or Python?
January 25, 2026 -

Hi everyone, I'm trying to decide between java and python based on future job demand and long term career growth. I also want to start learning databases and would like advice on which one to focus on such as PostgreSQL, MySQL, or a NoSQL option like MongoDB. My goal is to build strong job relevant fundamentals.

Find elsewhere
🌐
Reddit
reddit.com › r/learnprogramming › professor said learn python and java. why?
r/learnprogramming on Reddit: Professor said learn Python and Java. Why?
September 5, 2023 -

Hi all. I am a self taught learner of about 4 months now. In my last semester of school (business major), I took intro to programming and loved it. Really wished I did CS instead. I ended up emailing my professor from that class and asked what his thoughts were on self learning.

He told me to learn Python and Java and to have some kind of structure like an online course. Read the pragmatic programmer, and fluent python/effective Java.

I started with python and eventually found the Odin project and switch gears to js and web dev stuff. I am struggling to find a path and stick with it.

Why would my professor recommend those two languages to start with? Do these languages really relate to web dev? What kind of job opportunities can python and java lead to?

Top answer
1 of 59
134
If you had asked your professor "what's the most common language for web frontend development," he'd've probably told you JavaScript. But there are lots of kinds of programming out there, and Java and Python are a pretty good choice for covering a whole lot of bases. Python's one of the most popular languages out there, especially for what's trendy today (machine learning) and for developing being done by professionals who aren't primarily programmers (scientists, analysts, business-folks, artists). Java's extremely popular for big corporations building lots of complicated little business logic services, and it's still fairly popular for web backends. Plus, there are huge amounts of "learn programming" resources aimed at both of those languages. Also: if you really want to be a professional developer, I might suggest hanging out for an extra year or two to get a CS minor or something if you can. If your plan is to study programming, and they teach programming where you are, why leave? But I also understand that staying in school longer isn't always possible, financially or otherwise.
2 of 59
35
CS professor here. The programming language you choose as a beginner is mostly irrelevant. Python is known as an easy language because its syntax is similar to written English. If you really learn how to program, you'll learn that the language is just a tool. Asking for the "best language" this early is like comparing screw drivers without looking at the screw. Some languages will do some things better, but you don't need to know any of that right now. When you learn how to make a loop in one language, you can do it in nearly any language with the smallest of effort. The hard part is learning how to do something, not how to write it. Go deep, not wide. The things you learn in one language can apply to other languages. Your professor gave you good info. Thank them and take the advice. P.s. I'd rather hire someone who knows one language really well vs. Someone who knows a dozen languages at a shallow level.
🌐
DEV Community
dev.to › myexamcloud › the-ultimate-comparison-python-vs-java-in-2024-37dg
The Ultimate Comparison: Python vs. Java in 2024 - DEV Community
May 6, 2024 - Both Java and Python developers earn a similar median annual salary, which is around $96,000 and $97,000, respectively. In conclusion, it is not a clear winner between Python and Java in 2024.
🌐
Reddit
reddit.com › r/python › why python is slower than java?
r/Python on Reddit: Why Python is slower than Java?
January 3, 2024 -

Sorry for the stupid question, I just have strange question.

If CPython interprets Python source code and saves them as byte-code in .pyc and java does similar thing only with compiler, In next request to code, interpreter will not interpret source code ,it will take previously interpreted .pyc files , why python is slower here?

Both PVM and JVM will read previously saved byte code then why JVM executes much faster than PVM?

Sorry for my english , let me know if u don't understand anything. I will try to explain

Top answer
1 of 42
621
Both Python and Java compile the source files to bytecode. The difference is in how they to run this bytecode. In both languages, the bytecode is basically a binary representation of the textual source code, not an assembly program that can run on a CPU. You have a different program accepts the bytecode and runs it. How does it run it? Python has an interpreter, i.e a program that keeps a "world model" of a Python program (which modules are imported, which variables exist, which objects exist...), and runs the program by loading bytecodes one by one and executing each one separately. This means that a statement such as y = x + 1 is executed as a sequence of operations like "load constant 1", "load x" "add the two values" "store the result in y". Each of these operations is implemented by a function call that does something in C and often reads and updates dictionary structures. This is slow, and it's slower the smaller the operations are. That's why numerical code in Python is slow - numerical operations in Python convert single instructions into multiple function calls, so in this type of code Python can be even 100x slower than other languages. Java compiles the bytecode to machine code. You don't see it because it happens at runtime (referred to as JIT), but it does happen. Since Java also knows that x in y = x + 1 is an integer, it can execute the line using a single CPU instruction. There's actually an implementation of Python that also does JIT compilation. It's called PyPy and it's five times faster than CPython on average, depending what exactly you do with it. It will run all pure Python code, I think, but it still has problems with some libraries.
2 of 42
68
There are 2 things that mostly affect this: Language design and Implementation. Python is designed to be higher level and to be more easy to iterate quickly, for example by it's use of duck typing. Java on the other hand, while quite high level when compared to C, forces static type checks at compile time. This means the Java compiler can do optimizations that Python just can't, because it has more information ahead of time (because it forced the programmer to supply that information) Then there is implementation. At least for python I know a handful of language implementations that vary wildly in speed. CPython and PyPy with it'S JIT compiler come to mind. Many of the speed issues are just a matter of optimization. Java has been optimized a lot about 10 years ago I think? I remember sitting in uni and people talking about how Java has finally become fast ^^. Take this with a grain of salt, I don't enjoy java specifically, I might misremember the time. But Python definitely is getting faster by the year. The "normal" python implementation is working hard on optimizations since about 3.9. One of the things holding python back in many applications on modern hardware is the GIL, because it pretty much makes easy and fast multi threading impossible. There are Python versions without a GIL and there are efforts to remove and/or change it for main python as well. These are just some points and examples that came to mind, there is plenty more (Examples as well as details), we only scratched the surface here. I hope it helped though
🌐
Reddit
reddit.com › r/java › do you find java more aesthetically pleasing than python?
r/java on Reddit: Do you find java more aesthetically pleasing than python?
January 25, 2024 -

I have been programming for about 5 years now, and I started with Java then moved to Python before returning back to using a bit of both. After getting a good tour of Python, I have come to appreciate the static typed nature of Java. I find the way OOP works in Java to be much more aesthetically pleasing to look at than python code. Of course, there are exceptions to this rule when concepts get more complicated.

🌐
Reddit
reddit.com › r/learnprogramming › learn java or python?
r/learnprogramming on Reddit: Learn Java or Python?
June 6, 2023 -

Hi,

I am a university graduate who would like to change my career to IT. I want to apply for a requalification course and basically I have two options available - both courses are "Programmer of web applications" - one is in Java and the other is in Python.

I need some help from someone who knows the industry and the pros and cons of choosing either language. I have read a lot of articles and watched youtube videos and it's practically 50:50. I am leaning towards Python though.

I know your first question will be: What do you want to do in IT?

But that's the problem, I don't know. I have never worked in IT and I haven't experienced different types or jobs to be able to know which I like the most. It's like asking me which food from the menu I liked the most before I had a chance to taste it. I like design, so possibly frontend. But I am open to anything. I think fullstack would be a good skillset to have to find lots of work?

What I know:

Java is more complex to write, harder to learn for a beginner. It is used in web development, Android and in a lot of big companies. It is supposedly harder to change fields in IT if you know Java. The popularity of it is slightly decreasing and the community as well (from what I've heard).

Python is easier to write and read, is used in machine learning and AI and databases. Generally slower than Java to execute, has more potential when you are trying to change fields in IT as it is more widely used.

That's what I know. What I need, is help with this question: As someone (a teacher) who is trying to change career and do something that will enable me to find work easily, which language should I choose to learn to open myself to most job opportunities, something that will be a good start, give me most options for the future and will not lock me in in a specific field, should I realise I do not like it. How should I make a decision? Can you tell me in more detail which language is used in which specific types of jobs and what kind of stuff I could do should I learn Python/Java?

Thank you in advance!

Ben

Top answer
1 of 2
5
Java is more complex to write, harder to learn for a beginner. It is used in web development, Android and in a lot of big companies. It is supposedly harder to change fields in IT if you know Java. The popularity of it is slightly decreasing and the community as well (from what I've heard). True that Java has way more boilerplate than Python due to the full Object Oriented paradigm. False that it is more difficult to change fields False that the popularity is decreasing as well as the community. Java is the enterprise language #1 and stays there simply because there is already way too much Java out there Python is easier to write and read, is used in machine learning and AI and databases. Generally slower than Java to execute, has more potential when you are trying to change fields in IT as it is more widely used. Python has way more use cases than you list for it. The very web site we are communicating on is running on Python Yes, it is somewhat slower, but it can use precompiled fast libraries written in C/C++ for speed Python does not have more potential when changing fields and is not more widely used The above said: yes, it is a 50:50 chance. I would say that learning Java makes you a better programmer, though. Python abstracts way too much and has too many "convenience features". Don't get this wrong, though. Python is a great language, but so is Java. If you haven't been exposed to programming, I would still suggest Java. The expressive nature, verbosity, explicit static typing, excellent tooling, and excellent elaborate error messages make it an ideal first language, even though the very first steps are more difficult. Python on the other hand has an extremely easy entry, yet, the implicit typing can cause problems that beginners will easily stumble over and then be left dumbfounded. The error messages have improved lately, but still are by far not as clear as Java's. Yet, don't overthink the whole. The first language you learn will definitely not be the last and every consecutive language will be easier. In the beginning when you start from 0 you are battling at two fronts: you are battling with the vocabulary and grammar of the programming language (the easier battle) and you are battling with creating detailed step-by-step algorithmic solutions to problems (actual programming - the difficult battle). Once you understand that learning a programming language only is a necessary evil to tell the stupid computer what we want it to do and that the actual programming, namely analyzing and dissecting problems and then developing detailed step-by-step algorithms to solve that problems are two distinct, decoupled activities you will also see that programming languages are just tools to express trains of thought. Once you can program, the actually used programming language becomes secondary. Sure, the paradigms, the vocabulary, the grammar will be different, but if you know what you want to express, you can do it in any language. Developing the "what" is the tricky part. It is a bit like learning a spoken language with very restricted English-like vocabulary and grammar and writing a comprehensive fully developed novel in said language.
2 of 2
2
Remember, that no matter what you choose, it won't define your career for years to come - no matter if you start with Python or Java, you can always learn the other, or a third language in far less time than it took to learn the first. Programming is much more about problem solving and understanding computers, than specific languages. I would recommend Python, because you'll fairly quickly be able to build stuff with it. No matter if you are interested in web-applications, desktop games, scripting, data science or something completely different. Java tends (or tended) to give you a better understanding of Object Oriented Programming, because it is very strict about everything being a class, and so on, and the entire API is extremely Object Oriented, with big-Os :) But in later years a lot of this OOP strictness is becoming annoying, you tend to write a lot, and I mean a lot of extra code, simply to make the Java compiler not throw up on you. And even the folks behind Java has realized this, and newer versions include more and more short-cuts for writing more compact code ... Anyways - as for jobs, I guess it depends a lot on where in the world you live and work. Here in northern Europe, Java is mostly used by banks and insurance companies - there are a lot of Java-code running out there, but it seems like no new products or new companies base anything on Java. Also the banks tends to want university masters with 5-7 years of experience ... But again, it doesn't matter - when you have learned some programming, you'll quickly get ideas as what you want to build, and maybe you need to learn Swift or Kotlin or React or C# to build those kind of applications, but that is the way it is going to be, there'll always be more to learn, so might as well just get started, and have fun along the way!
🌐
Reddit
reddit.com › r/learnjava › is java still a better choice for beginners?
r/learnjava on Reddit: Is Java still a better choice for beginners?
November 6, 2024 -

I'm wondering if Java is still worth learning as a beginner in 2024-25, or if other languages like Python or newer options are a better investment. With the evolving tech landscape and the rise of mobile and AI, is Java still in demand? Would love to hear from those who've learned Java recently or are working in the field – is it still a solid choice?

Edit: I'm currently focused on Mobile Development using Flutter, I'm asking this question only for reference. Also thank you for the responses.

Edit 2: Thank you for all of your responses and I have gained a better understanding.

🌐
Reddit
reddit.com › r › learnprogramming › comments › 1cayf8w › should_i_switch_to_python_from_java
Should I switch to Python from Java : r/learnprogramming
April 23, 2024 - Inputting is a struggle too, because you have to make a scanner object, I mean I think anyone who codes Java gets it. I am good at solving problems in LeetCode with Java too, but having to write so many extra stuff is tiring and it wastes a lot of time in technical interviews. I am currently working on a project and I use Python with it.
🌐
Reddit
reddit.com › r/learnprogramming › c/c++ or python, which one to start with in 2024?
r/learnprogramming on Reddit: C/C++ or Python, which one to start with in 2024?
January 29, 2024 -

Hi all, it’s the same old question, which language should you start with as someone new to the world of programming.

Typical at university level in engineering majors (Electrical Engineering) you are usually taught C. Thats where i got introduced to programming for the first time. But the way universities are structured, it’s not always the best place to learn programming especially in a non-CS major.

Long story short, I find myself with this passion to dive deep and actually understands what programming is not just a language, but as they say, you have to start somewhere, hence the title statement, where do you start from in 2024?

I narrowed down these options as Python seems to be the most beginner friendly language whereas a languages like C/C++ has always been regarded as the languages to under to understand every other language with ease and especially to really understand the “source code” to programming itself.

Appreciate any advice/experiences, thanks!