🌐
Reddit
reddit.com › r/learnprogramming › java vs python vs c++
r/learnprogramming on Reddit: Java vs python vs C++
May 23, 2023 -

Hey y'all, I'll be needing to choose either one of Java, python, c++ or web programming for my second semester in electronics and communications but i have no idea where to start from

I've learnt all the basics of c programming in my first semester and i have to choose between the above mentioned for the second semester and it's really rattling my brain

Which of them would be better for a beginner to programming language and which would be most helpful in the future, if you'd have to say?

Thanks in advance!

Top answer
1 of 5
264
All of those languages are useful in different situations. Python's very popular with scientists, ML engineers, and the like. Non-programmers who need to write programs love it because it's approachable and has a plugin for basically anything. It's my favorite language for writing tiny, one-off programs and doing hackathons and coding competitions and stuff. Java's the workhorse of the corporate world. If you're writing a giant application full of business logic for a big corporation, and you're gonna maintain it for two decades, Java's still the default choice. C++ is the most powerful option. If you need something to go as fast as it can go, C++ is your default choice. But whole types of bugs around stuff like memory that are basically impossible to cause in Python or Java are really easy to cause in C++, and its error messages aren't so much legible as they arSegmentation Fault (core dumped). You can go far with any of them, and there's a good chance you'll end up learning all three at some point.
2 of 5
88
Love Python, but I’m in the “it’s better as your 2nd/3rd language” camp. The others are ‘harder’ and force you to gain a deeper understanding. Then you can pickup Python super easy. “Oh hey, it basically works the same but just does all the fiddly bits for me”. But you would know what those fiddly bits are, and can check the docs and be certain that behind the curtain it really is doing what you think it is. People who do it the other way around seem to have it harder, they don’t know how much Python is doing for them, why, or that it even is.
🌐
GeeksforGeeks
geeksforgeeks.org › java › c-vs-java-vs-python
C vs C++ vs Java vs Python vs JavaScript - GeeksforGeeks
Java – Compiled to bytecode, runs on JVM (interpreted/JIT-compiled). Platform-independent, strongly typed, with automatic garbage collection. Popular for enterprise android and backend systems.
Published   August 12, 2025
Discussions

Is programming in Python faster than in C, C++ or Java? - Software Engineering Stack Exchange
Syntactically, Python code looks like executable pseudo code. Program development using Python is 5-10 times faster than using C/C++, and 3-5 times faster than using Java. In many cases, a prototype of an application can be written in Python without writing any C/C++/Java code. More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
Very broadly, what are the differences between C, Python, and Java?
C is compiled down to a platform-dependent binary executable (e.g., a .exe file on Windows). You can't take one of these binaries and run it on a different operating system, as it has been compiled to run for a specific operating system. C does not have a runtime/garbage collector, which means that you have to manually manage the memory allocation of your program (see malloc and free). One has to be careful when managing the memory of their program, as there's an entire class of memory bugs that managed languages (languages with a garbage collector, for instance) don't have. In fact, since C is a lower level language, it does not give you many of the features that other languages have out of the box, such as generics, interfaces, classes, or lambdas. However, because C is such a bare-metal language, it is supported across the most computer architecture, can be optimized to run incredibly quickly, and can use extremely little resources. Java, like C, is a compiled language. However, it does not get compiled down to binary files, but rather to an intermediate representation known as JVM byte code (.class files). This can then be interpreted (see the Java JIT) by a platform dependent program known as the Java Runtime Environment. Java programs are garbage collected, which means that the interpreter itself will ensure that your objects and variables are allocated and deallocated as necessary, which protects Java programs from a whole range of memory bugs that C suffers from. This comes at a performance cost, as this means that your program suffers from the overhead of having to run both itself and this garbage collector in the background. Java has language features such as interface, classes, generics, lambdas, and foreach loops that can be leveraged to write safer and cleaner code. Python is a dynamically typed and interpreted language. Whereas it's possible to detect type errors at compile time in C and Java (i.e., trying to pass a boolean into a function that expects an integer), Python will not detect these type errors until it tries to execute that section of the code. The python interpreter will directly interpret your .py file (that's half true, the interpreter will create .pyc files to prevent having to parse a file multiple times). This means that there is no compilation step necessary to execute Python source code. Python, like Java, is a garbage collected language. It has a plethora of language features such as list comprehensions, generators, coroutines/async, and literals for datatypes such as lists, sets, and dictionaries. While this will vary from program to program, Python will typically be slower than Java, and much slower than C. To summarize, C is statically typed, low-level, and essentially has no run-time. Java is statically typed, garbage-collected, and compiled to an intermediate representation that then gets executed by a platform-dependent run-time environment. Python is dynamically typed and interpreted with a large amount of language features, albeit with generally worse performance. More on reddit.com
🌐 r/learnprogramming
21
14
October 24, 2017
Should I learn C, Java or Python?
Python might be the easiest to start with. And it is quite useful under Linux to automate certain things for example. More on reddit.com
🌐 r/linuxquestions
13
0
January 26, 2022
What Programming language and why? C, C++, Python, C#, Java, etc
Since you have used MATLAB and R, I would suggest Python. Python has data visualization libraries, numerical libraries, etc. So if your background is more into data related stuff, Python has stuff aimed at that community (why Python was picked is unclear, because it could have been Ruby). But Python can be used to make web applications, games (maybe not like C# or C++). It has object oriented features, etc. The main complaint is that it's slow compared, say, C++. Try not to pigeonhole languages for one purpose. C# was developed because Microsoft was told to stop their work on Java, so they built a Java clone. They didn't think "Oh, this is just like Java, so we shouldn't bother creating this language". People often write languages because this feature or that feature annoys them, and they want to "fix" it with something better. Arguably, Java was created because people thought C++ was too complex and that maybe it was time for a non-functional programming language to use a garbage collector. They went through features they felt were creating complications in C++ (multiple inheritance, pass-by-value, memory allocation, etc) and cleaned it up (although Java is a pretty verbose language). It's just like if you wanted to buy a Honda vs a Toyota. These car manufacturers don't decide to create vehicles that fulfill a niche. To some extent, that can be true of languages. Even the idea of a programmer sitting down to do a project and "picking an appropriate" language doesn't always happen. If your group is good with Python, then they might not bother with doing the code in Java or C++. With whatever limitations a language has, familiarity with how it works is often more important. Also, although people love languages, there's more to programming than learning a language. More on reddit.com
🌐 r/learnprogramming
10
1
May 5, 2021
🌐
Quora
code.quora.com › Which-language-is-best-C-C-Java-or-Python
Which language is best, C++, C#, Java, or Python? - Code - Quora
Python for when you need to do something quickly, and C# for when you need better performance. They are both very easy. C# is slightly more difficult, but it is worth it. As a beginner, I guess it would be better to stay away from C , C++ and Java.
🌐
Medium
abhinnpandey.medium.com › python-vs-c-vs-java-choosing-the-right-language-for-your-project-31947682a1fd
Python vs. C++ vs. Java: Choosing the Right Language for Your Project | by Abhinn Pandey | Medium
June 19, 2023 - Python excels in rapid development and ease of use, C++ shines in performance-critical applications and systems programming, while Java offers robustness and platform independence.
🌐
ClarionTech
clariontech.com › blog › java-vs.-python-vs.-c
Java vs C vs Python for App Development: A Guide for CTO
December 6, 2024 - While it is frequently derided as being less performant when it comes to CPU-heavy workloads than Java or C#, it is a fantastic language for prototyping and scalable python app development in and cloud-native applications with rapid turnaround times.
Address   The Hive, Raja Bahadur Mill Rd, Beside Sheraton Grand Hotel, Sangamvadi, Pune, 411001
🌐
Codingal
codingal.com › coding-for-kids › blog › what-is-the-difference-between-java-python-and-c
What is the difference between Java, Python and C++ | Codingal
February 3, 2025 - As a result, it keeps bringing a lot of value to the field of software development. Python offers new libraries, quick prototyping, and other new capabilities while requiring less programming.
🌐
PW Skills
pwskills.com › blog › dsa › java vs c++ vs python
Java Vs C++ VS Python
November 4, 2025 - Java is a platform-independent language, whereas C++ is a very fast and compiled language, and Python is easy to learn due to the extensive support of modules and libraries it provides.
Find elsewhere
🌐
Career Karma
careerkarma.com › blog › tech guides › python vs. java vs. c++
Python vs. C++ vs Java: Everything You Need to Know | Career Karma
October 29, 2022 - Also, Java supports automatic garbage collection and memory management, reducing the number of things the programmer has to handle directly. You’ll have to mentally insert the ‘++’ part. Sorry. C++ is a member of the C programming language family. Like Python and Java, C++ is a fast, efficient, object-oriented language with a wide variety of use cases.
🌐
Javatpoint
javatpoint.com › c-vs-cpp-vs-python-vs-java
C vs C++ vs Python vs Java - Javatpoint
C vs C++ vs Python vs Java with Python with python, tutorial, tkinter, button, overview, canvas, frame, environment set-up, first python program, operators, etc.
Top answer
1 of 5
19

Ousterhout's article1 about scripting languages suggests that the higher level the programming takes place, the more productive the programmer is. If we take that, as Boehm says2, the number of lines a programmer can write in a given time is constant and not dependent on the language or its type (low level, system programming, scripting), one can easily believe the claim. The resulting instructions-per-source-code-line -ratio can be an order of magnitude (or several) better with scripting languages than with system programming languages.

As scripting languages heavily rely on ready-made utilities for common tasks (e.g. data structures, string manipulation), their main use usually is to enhance productivity with the cost of slower running speed by providing a syntax that's easy to learn and efficient to upkeep programs with. One doesn't resort to a scripting language when top execution speed is needed.

[1]: J. K. Ousterhout, Scripting: Higher Level Programming for the 21 Century, Computer (IEEE), 1998
[2]: B. Boehm, Software Engineering Economics, Prentice Hall, 1981

2 of 5
8

If you measure productivity as "time to write a specific simple program" then it depends so much more on programmer experience and quick mind than the language that you are really evaluating the programmer, not the language.

I believe timed code contests indicate that the language doesn't really matter for those kinds of tasks. There is no one language that wins such challenges easier than others (at least not if you allow for the relative popularity of languages).

If you measure performance as "the effectiveness of the best program" written in a given language, then it's even less language-dependent. See for example the results of the Galcon AI contest. The winner is written in Lisp. The next Lisp entry, however, is ranked #280. What does this tell us about the language's suitability for writing great AI efficiently? In my opinion, nothing. It just tells us that "bocsimacko" came up with and implemented the most effective algorithms. For the record, time was not a major factor in this contest - people had more than two months to develop their code.

Lastly, if you measure performance as "long-term cost of maintaining a project" then I think you're onto something. Especially if you hire only the best people for the job, and count cost in man-hours rather than dollars. I have a strong opinion on which languages are best for this, but having no hard evidence to link you to I'll leave this opinion out. Perhaps someone else has links for this type of performance.

🌐
Python
python.org › doc › essays › comparisons
Comparing Python to Other Languages | Python.org
For example, a Python programmer wastes no time declaring the types of arguments or variables, and Python's powerful polymorphic list and dictionary types, for which rich syntactic support is built straight into the language, find a use in almost every Python program. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time.
🌐
Quora
quora.com › What-are-the-main-differences-between-C-C-Java-Scala-Kotlin-and-Python-Which-programming-language-is-recommended-to-learn-first
What are the main differences between C, C++, Java, Scala, Kotlin, and Python? Which programming language is recommended to learn first? - Quora
Answer (1 of 3): H̲m̲m̲ ̲,̲ ̲c̲o̲m̲p̲a̲r̲i̲n̲g̲ C̲,̲ ̲C̲+̲+̲ ̲,̲ ̲J̲a̲v̲a̲ ̲,̲ ̲S̲c̲a̲l̲a̲ ̲,̲ ̲K̲otli̲n̲ ̲, ̲a̲n̲d̲ ̲P̲y̲t̲h̲o̲n̲ ̲i̲s̲ ̲a̲ ̲b̲i̲g̲ ̲a̲s̲k̲—t̲h̲e̲y̲’̲re̲ ̲a̲l̲l̲ ̲s̲u̲p̲e̲r̲ d̲i̲f̲f̲e̲r̲e̲n̲t̲ ̲.̲ ̲L̲e̲t̲’̲s̲ ̲s̲e̲e̲ ̲,̲ C̲ ̲i̲s̲ ̲l̲o̲w̲-̲l̲e̲v̲e̲l̲,̲ ̲b̲a̲r̲e̲-̲m̲e̲t̲a̲l̲ ̲s̲t̲...
🌐
Medium
medium.com › swlh › a-performance-comparison-between-c-java-and-python-df3890545f6d
A Performance Comparison Between C, Java, and Python | by Gunavaran Brihadiswaran | The Startup | Medium
July 24, 2020 - A Performance Comparison Between C, Java, and Python This is what happened when I ran matrix multiplication in all three languages I have been doing a lot of implementations in C language for my …
🌐
Codetrade
codetrade.io › home › python vs. java vs. c++: key differences with real-world examples
Python vs. Java vs. C++:Key Differences With Real-Time Examples
February 16, 2024 - Software Development: To simplify the software development process of complex applications, python is widely used by software developers. With Java, you can write once and run your code anywhere because of a platform-independent programming language.
🌐
Quora
quora.com › Which-programming-language-is-faster-Python-C-or-Java
Which programming language is faster, Python, C++, or Java? - Quora
Answer (1 of 3): In general, C++ is the fastest (compiled, low-level control), Java is in the middle (JVM adds overhead but is still optimized), and Python is the slowest (interpreted, high-level, great for quick development).
🌐
Sololearn
sololearn.com › en › Discuss › 253502 › c-vs-java-vs-python-who-wins-
C++ vs Java vs Python who wins? 💪💪 | Sololearn: Learn to code for FREE!
Both C++ and Java source codes will be more number of lines. Python will reduce the lines even for complex algorithms. Winner: Python Easy to learn 😍 😍 😍 There is no doubt, Python is lot easier to learn as a beginner programming language.
🌐
Sololearn
sololearn.com › en › Discuss › 1440998 › python-c-sharp-c-or-java-
Python, c sharp, c++ or Java ?? | Sololearn: Learn to code for FREE!
Ok Python is for A lot of different things like A.I some 2d game development works on robots. c# is just for Windows device development it runs on the .Net framework it's basically Java just for Windows c++ is King when it come to programming but it is very hard to learn and requires you to write longer lines and to get something done that python could do in five.
🌐
InterviewBit
interviewbit.com › compare › difference between c and python
Difference Between C and Python - InterviewBit
September 26, 2023 - C is a modular language, that is, it emphasizes on separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality. One of the most promising languages of the upcoming times, Python is a general purpose high level language which is interpreted.
🌐
Reddit
reddit.com › r/learnprogramming › very broadly, what are the differences between c, python, and java?
r/learnprogramming on Reddit: Very broadly, what are the differences between C, Python, and Java?
October 24, 2017 -

From the perspective of the uninitiated, with a low level of proficiency, they look functionally indentical: all very useful, and each one capable of a wide range of tasks. A few syntax differences aside, elementary stuff looks practically interchangable.

At a deeper than surface level, what sorts of specialties does each offer? I’m a beginning programmer looking to get a basic lay of the land, as it were.

Top answer
1 of 5
22
C is compiled down to a platform-dependent binary executable (e.g., a .exe file on Windows). You can't take one of these binaries and run it on a different operating system, as it has been compiled to run for a specific operating system. C does not have a runtime/garbage collector, which means that you have to manually manage the memory allocation of your program (see malloc and free). One has to be careful when managing the memory of their program, as there's an entire class of memory bugs that managed languages (languages with a garbage collector, for instance) don't have. In fact, since C is a lower level language, it does not give you many of the features that other languages have out of the box, such as generics, interfaces, classes, or lambdas. However, because C is such a bare-metal language, it is supported across the most computer architecture, can be optimized to run incredibly quickly, and can use extremely little resources. Java, like C, is a compiled language. However, it does not get compiled down to binary files, but rather to an intermediate representation known as JVM byte code (.class files). This can then be interpreted (see the Java JIT) by a platform dependent program known as the Java Runtime Environment. Java programs are garbage collected, which means that the interpreter itself will ensure that your objects and variables are allocated and deallocated as necessary, which protects Java programs from a whole range of memory bugs that C suffers from. This comes at a performance cost, as this means that your program suffers from the overhead of having to run both itself and this garbage collector in the background. Java has language features such as interface, classes, generics, lambdas, and foreach loops that can be leveraged to write safer and cleaner code. Python is a dynamically typed and interpreted language. Whereas it's possible to detect type errors at compile time in C and Java (i.e., trying to pass a boolean into a function that expects an integer), Python will not detect these type errors until it tries to execute that section of the code. The python interpreter will directly interpret your .py file (that's half true, the interpreter will create .pyc files to prevent having to parse a file multiple times). This means that there is no compilation step necessary to execute Python source code. Python, like Java, is a garbage collected language. It has a plethora of language features such as list comprehensions, generators, coroutines/async, and literals for datatypes such as lists, sets, and dictionaries. While this will vary from program to program, Python will typically be slower than Java, and much slower than C. To summarize, C is statically typed, low-level, and essentially has no run-time. Java is statically typed, garbage-collected, and compiled to an intermediate representation that then gets executed by a platform-dependent run-time environment. Python is dynamically typed and interpreted with a large amount of language features, albeit with generally worse performance.
2 of 5
19
A major difference between the three is this; C is compiled straight to binaries and is run on the machine that compiled it or same/very-similar type machines. Java is is compiled into byte code which is run on any machine that can run a Java Virtual Machine (JVM). Python is interpreted by the machine that is running it at run time. What this means to you is that C is the most difficult to make programs that will run on different types of systems but is hella fast and super powerful on the ones it runs on. Java is easier to run on different machines, say mac and pc, but is slightly slower and more difficult to make powerful. Python runs on just about anything, as long as there's an interpreter written for it, but it's slow as shit and significantly more limited in what it can do, at least when compared to C and Java.