r/AskProgramming • u/ur_nighmare • May 23 '26
Python or Java
im in my last year and figuring out which programming lang is for me but confused betn java and python i love both cause im comfortable with both but want to focus on one which one of them is best suited in future too.
things i know: python is readable and easy than java
python is used in ai because of its simplicity
java is suitable for secure appln(banking sys)
3
Upvotes
14
u/Hamburgerfatso May 23 '26
Its easy to swap from one language to another. The underlying skill you learn and train is programming
6
u/TheRNGuy May 23 '26
You'll have to be the one to choose.
5
u/DataPastor May 23 '26
Try to maintain both – and find a real job.
Actually it is worth to learn Kotlin. It is a very nice language, which learnt a lot also from Python. And it is spreading also in the backend world.
3
u/FineWolf May 23 '26
I would choose Java personally.
It's similar syntax and paradigm wise to a lot of programming languages you'll encounter professionally, which means the skills you'll learn will be more easily transferable to languages (C#, JS, TS, etc.). Learning Python after will be fairly simple.
Starting with Python means that you'll have a slightly harder time shifting to more traditional OOP languages.
3
u/joranstark018 May 23 '26
As you point out, they both have their stenghts and weakness, it is impossible to recomend either since much depends on what the work situation is in your area and what you are interested in. Check work adds, look for work fairs and meetups i your area, try to network.
3
u/Conscious_Ad_7131 May 23 '26
It’s not a choice, you need to be able to develop in every language, they’re all similar enough that it’s not hard to be flexible once you develop the skills
2
u/gm310509 May 23 '26
Programming languages are simply tools that allow you to explain to a computer what you want it to do.
Like other tools they have their pros and cons. For example, when it comes to fixing two things together, which is better screws or nails? What about glue?
It isn't that different here. I use various languages for different purposes. Often the choice is not made by me, but the circumstance. For example, when I am working on embedded systems I will use C/C++ (and sometimes assembly language). When I am building network services or GUI applications or character mode applications that I want to run fast, I will use Java (or sometimes C/C++). If I want to quickly build something that can manipulate data, I will use python (and sometimes bash). When I am working on my accounts and finances in Excel, I will use VBA and Excel macros. And so on...
Like fastening things together, it is best to know several methods and choose the most fit for purpose. Same goes for programming languages.
2
u/Critical-Volume2360 May 24 '26
I think python is becoming more common while java is becoming less so. I think theyll both be around though in the future. Though if java is less popular, you might get a higher paying job with it maintaining legacy stuff
2
u/YouDoNotKnowMeSir May 24 '26
Java unless you’re going to do data science or AI/ML.
Otherwise Java is what makes you employable.
3
u/Psy_Fer_ May 23 '26
Rust (semi sarcasm)
Although learning rust from java is easier than from python
Either way, using the language that will get the job done best is how you should be thinking. I can make a genome browser in AHK, but should I? (I kinda want to know for a joke).
After a few years as a Dev you'll know multiple languages and move into doing one over the others for a time before moving into something else in a different language, or whatever. Languages are like drills, hammers, saws. Sure you can use a hammer to put in screws but is it the best way to do it?
1
u/Sprinkles_Objective May 23 '26 edited May 23 '26
I think Java will teach you a lot more. Python threading is still in a weird place with the GIL still largely being a thing, basically Python you can't have threads running in parallel, so they aren't as widely used. Java just has a lot more to it, and a lot better structure. It also has an enormous standard library, and is better for learning a lot of complex topics like disturbed systems, multi threading, and that kind of thing.
1
u/HereForC0mments May 23 '26
The first question is do you know what kind of job you'll be applying for once you graduate? Programming languages are tools and the different languages exist to excel at different types of tasks. If you were going into OS kernel programming I'd tell you to master C, but C would be a horrible choice if you were trying to build web apps for example.
Right tool for the right job, so figure out what job you'll be doing and master the tools of that trade. If you're unsure, then I'd probably pick java, as the process of learning to use that language well will involve learning many concepts that you'll need in basically any language.
1
u/bamboozlenator May 23 '26
Choose based on what you want to do with your career. I personally have not ran into any Java while working cyber security, financial and space industries. Python I have seen, but only as a scripting tool for minor tasks. Majority was Go, C, Cpp, Js.
1
u/Extension_Buy9718 May 23 '26
Checkout job websites. Checkout what stack is the most abundance in your place.
1
u/Ok-Somewhere7722 May 23 '26
I’ve personally found it hard to switch from strict to easy. Python is popular
1
u/Euphoricus May 23 '26
place superman meme here
C#
1
u/nicodeemus7 May 23 '26
What do you want to do with it? You already know the strengths of each, so apply that to your choice. Do you want to make more UI friendly applications, or focus more on that data? Also, there is no harm in fully learning both. No one language is perfect for everything you want to do.
1
u/PabloDons May 23 '26
Why not both
1
u/ImprovementLoose9423 May 23 '26
It really depends on what you want to go into. I am personally a python dev and I got into AI and ML. Also, python devs get good money and they are in very high demand because of the AI boom.
1
u/codingwithaman May 24 '26
You can pick any and learn fundamentals. It's very easy to switch frameworks and languages when you have in depth knowledge of any one language or framework.
Java is also used in AI these days with help of frameworks like spring ai, langchain4j.
1
u/Umberto_Fontanazza May 24 '26
Python per come la vedo io é più difficile. Chiami un metodo e non sai che eccezioni ti tira comunque fai un progetto interessante con uno e cambiare ci vuole un secondo
1
u/Aristoteles1988 May 26 '26
Python 🐍
1
u/BlubelDigital May 27 '26
Your high-level assessment is actually spot on. A lot of students get overwhelmed by syntax, but you’ve already figured out the core personalities of both languages: Python is the king of speed and innovation, while Java is the absolute tank of enterprise stability.
Since you are in your final year, you don't need to stress about making a permanent life choice here—programming languages are just tools, and a solid software engineer can switch between them when needed. However, choosing where to double down right now comes down to what kind of industry you want to break into.