DEV Community

Cover image for Java vs Python
Konchada Sai Ansul
Konchada Sai Ansul

Posted on • Originally published at

Java vs Python

Hello Guys, Welcome back to another post of Sai Ansul's Blog.
In this blog we are gonna find which programming language is better.

So let's start,

Firstly let us know what is programming?

Programming is the way we can make the computer perform various tasks.

What is programming language?

It is a formal language to perform various tasks, there are several protocols and algorithms to be followed.

Let us know the types of programming languages:

  • Procedural Programming Language.
  • Functional Programming Language.
  • Object-oriented Programming Language.
  • Scripting Programming Language.
  • Logic Programming Language.

Some names of programming language are:

  • C++ Language.
  • C Language.
  • Pascal Language.
  • Python Language.
  • Java Language.
  • Perl Language
  • Lisp Language

The Comparison Factors are

  • Speed
  • Legacy
  • Code
  • Practical Agility
  • Trends

1. Speed

In the terms of speed Java is faster than Python as it is a compiled language, so it takes less time to carry out the program as compared Python is an interpreter language and it takes more time than Java language to carry out the program.

2. Legacy


Java's legacy problems are typically larger and more numerous than python’s .
Python has less legacy problem so world finds difficulty for the script to copy and paste codes and gives it a slight edge over the other languages.

The other confusion that arises when we say that the two languages that is which one is easier between Java & python. So let’s have a look at the number of lines required while writing a code in both the languages.

3. Code

Java is very talkative as compared to Python. It takes 10 lines of code to read from a file in Java.
Python only takes 2 lines of code in Python. This makes Python a more preferable language.

4. Practical Agility

Java enjoys more support than python thanks to its static type system and universality of IDE’s in development. It is more popular for mobile and web apps.
Python has an existence in the talent space and is considered to be the most favorable language for Machine Learning, Artificial Intelligence, Internet of Things and a lot more.

5. Trends

While not as trendy as Java was, it is still the most popular programming language by virtually any measure. On the other hand, Python’s growth has been astronomical, especially in developed, high-income countries. The reasons for this amazing growth include developer productivity, language flexibility, library support, community support, and ease of learning.

Now with this, we come to an end of this comparison on Java vs Python. Python has a slight edge over Java and wins the battle in most of the factors. So, if you have read this, you might have a clear idea about which programming language is better and which one you should use.

If you liked this blog and want to support my efforts, do share it with as many friends as possible. And feel free to drop in suggestions for improvements.

Top comments (4)

alexanderg profile image
Alexander G

In my opinion it is not supreme what is in the languages, it is what you need to do because there are things that in Java is more convenient to make that in Python and Visceversa ..... but I giving my personal opinion I am Pythonist. But congratulations for the post, I mean there is no supreme but it is good to know the pros and cons of languages

saiansulsblog profile image
Konchada Sai Ansul

Thanks! I'm glad you liked it💯

abhilearnstocode profile image

It's not about better or best. But it's about which language has the right tools for your task to get completed. Languages are like bridge i.e., just a tool to tell computer to do something.

saiansulsblog profile image
Konchada Sai Ansul

Yes, you are right

Some comments may only be visible to logged-in visitors. Sign in to view all comments.