Ask coding questions

← Back to all posts
Python vs Java
AquaMarine0421 (68)

Hey :) I'm a learner of C/C++ and LOLCODE; I'm nearly finished with both, so I'm thinking of a 'second' (rather, third) language. I'm getting confused of which to learn between Java and Python. People around me say that Java's more useful, while Python is easier to learn. What's your opinion? And why? Leave it below:)

Pythonier (316)

@SPQR, @eankeen, @Vandesm14: I think we all responded at the exact same time!

Vandesm14 (2729)

@SPQR Yep! After posting my comment, I refreshed it and was surprised at how many people commented that fast!

Pythonier (316)

@Vandesm14 Although I think mine was just a minute before yours and @SPQR

Pythonier (316)


eankeen (2175)

🤔 Hmm. To be honest, you could go with either. If you're in academia (and they use Java) I would probably go with Java just to make your computer science classes easier. If you don't think you're going to be taking any Java classes in the near future I would go with Python. I'm not sure how much you're learned in terms of theory when doing C/C++, but Java is a perfect language if you want to learn about that kind of stuff.

Have you considered learning JavaScript? :) It's a wonderful language!

Pythonier (316)

They are both great languages, Python is easier to learn but that doesn't mean it is not useful. Java is great, but a little harder. You can choose either one and be happy with your decision, but If you choose Java, I would recommend learning Javascript first.

SPQR (592)

@Pythonier Personally I find that JS and Java are less similar than C++ and Java, so since he already knows C++ he's probably good (He might want to learn JS instead partially because Java and C++ are so similar and thus are often interchangeable for pretty much any given task)

AquaMarine0421 (68)

@SPQR It's OK anyone can make mistakes :)

AndrewBowers1 (1)

LOLCODE is like python so python will be easier

AquaMarine0421 (68)

@AndrewBowers1 thank u for ur reply! I am considering many different options at this point!

algore (21)

I for one know both languages decently well, and say this the people telling you Java is more useful are 100% wrong, not only does python have more application uses it is very common in Academia while java is being moved out of academic areas, and as well Python is one of the fastest growing needs in the Software Engineering industry, with great payments. Python is in my opinion one of the best languages for any purpose you may have for it, I use it for game programming, web programming, cybersecurity, and other tasks such as creating AI / messing about with machine learning. The only times I use Java out of class is never. So if you want to learn/master something practical and can very likely be what you will be working with 5-10 years in the future choose python, but if you are looking to learn more languages learning Java will also be beneficial as it shares many of the same concepts as other languages, while python is more unique. I would suggest if your only options are as listed, is to choose Python as your next language to learn, because of the practical uses the language has.

itbarsoum (62)


I recommend Python (3.7 - not 2.7) because of its use in data science. First, python has a simple syntax.

The Zen of Python:

Open a bash terminal
type python3
type import this


Python is a great language to write anything from simple text adventure games to complex ones - all using data collection. In its simplicity, it is the perfect second language (but not a good first language). I recommend learning python from an expert rather than from an online program such as CodeCademy. However, if there is no other way, use CodeCademy.


HTML, CSS, and JavaScript (NOT JAVA) are always a good trio of second or third languages. They are empowering, allowing you to make websites, style them, and power them. These languages are good to learn from CodeCademy, but also good coming from experts if possible.

It's always good to know as many languages as possible, in any order possible (except with python first)

Mavrick (81)

Python is so much better; if you've learned C, you can learn python in like 5 minutes.


I like python but java is more useful to me.

a5rocks (829)

Okay so, I recommend Java from your current experience.

It's "object-oriented", which means you need more code to do the same thing, but it's normally more expressive. At least, that's what object-oriented is to me. (though that's with stateful programming,

Though, if you want to die, try learning Lisp

ebest (672)

@a5rocks If you REALLY want to die, learn brainf


@ebest or the MOO language (not in yet)

a5rocks (829)

@RoylatGnail or whitespace

or unlambda

or malbolge


@a5rocks or any meme language

a5rocks (829)

@RoylatGnail molbolge, unlambda, and whitespace are not meme languages... Just esoteric.


@a5rocks I meant joke languages.

SPQR (592)

Java, especially if you've already learned C++, they're very similar and the transition is easy. Python's sole purpose is to be simple, it's not very good at anything else.
Side note: Idk what you mean by "finished" with the languages, there's always more to learn. I'd honestly recommend getting really into a language rather than knowing several with only baseline knowledge of each.

EDIT: Python is useful sometimes, when you just need to do something simple and performance isn't an issue. It really depends on what you want to be doing.

AquaMarine0421 (68)

@SPQR Yea maybe i should just stick w/ C and C++...

SPQR (592)

@AquaMarine0421 That's what I'd strongly recommend. With C/C++, knowledge of the language grows exponentially as long as you're learning. What i mean by that is, once you've learned the basics, everything else comes much easier and only gets more easy the more you learn. If you can't find a good course for learning the language, that's fine, what I ended up doing after i learned the fundamentals was I started working on more and more complex projects which required me to implement more and more advanced concepts to work properly. When I found something I didn't know, I'd think of a potential solution to a problem, and a quick Google search would usually yield a solution, and reference documentation to learn from. If it doesn't, you can always ask here (or if you're so inclined, ask me personally, my email is in my profile and I like helping)

Vandesm14 (2729)

Java would be better since it is supported by a wider spread of systems. Plus, you can use Java to code games, and not just text adventures (*ahem*, python). Although, Python is easier to program, the language is not as powerful or expansive as Java.

Please mark this as answered if I helped your problem 👍

yanovsky (10)

learn Python. Its so much easier, and is learned way quicker. Besides, if your not going to make complicated things, python is WAY more useful. LEARN PYTHON EVERYBODY!

Steven_The_GuyT (329)

I know both Python and Java. I think that Python is easier to read, and you have to type less. Java is longer, but I have created many more non-console games in Java than I have in Python. You could always use Pygame, but I have to learn more about Pygame.

AquaMarine0421 (68)

@Steven_The_GuyT thank u for ur helpful reply! I'll have to find out more tho...

SethPeace1 (2)

Python. It would help me in my argument against LB (he's my friend). He thinks Java's better (it's not).

ebest (672)


Really, you are correct about the game thing, without turtle.

Not advertising, it was from someone else. Python gets hard to program when the problem is complicated, but if you're a beginner at coding python would be recommended. But you already know C++/C, so Java is better, as it's more usable.

Unrelated: You really like Scratch, don't you? You're name description made something in my mind click.

AquaMarine0421 (68)

wow you guys are experts!

HarperframeInc (456)

Why worry about choosing python and java? Have you ever considered Jython?
Jython combines Java and Python to make a useful, easy to learn language. There is also Cython, which is C and Python Combined. It gives more support to other libraries, and you can use python for low-level programming.

pyelias (2633)

@HarperframeInc Jython is just a Python interpreter with Java bindings, not a separate language.

TheDrone7 (1900)

I would recommend Java out of the two that you're planning to learn. But if I were to make a third suggestion of my own, I would recommend you to learn JavaScript and eventually node.js too.

KeaganLandfried (39)

You learned LOLCODE...? ._. how

AquaMarine0421 (68)

@KeaganLandfried i just read the newsletter N found some tutorials