Friday, 5 October 2018

Java vs Python Comparison

Java :-

It is a fast, secure and reliable general purpose computer programming language.

Python :-

A Readable, efficient and powerful high level programming language.




1. Speed

Java 
    → Statically Typed and Faster than Python
Python
    → Dynamically typed and Slower than Java.

2. Legacy :-

Java 
    → Java legacy systems are typically larger and numerous
Python
    → Python has less legacy problem

3. Code

Java
    → Longer lines of code when compared to Python
Python
    → Shorter Lines of code when compared to Java

4. Databases

Java
     → Most popular and widely used database
Python
      → Access layers are weaker than Java's JDBC

5. Practical Agility

Java
       → Popular for mobile and web applications
Python
        →  Popular for Data Science, ML, AI and IoT.

6. Trends



7. Salary 




8. Syntax 

Basic Differences

Java
     → Java is a compiled language.
     → Java is an object oriented programming language.
     → Java is statically typed.
Python
     → Python is an interpreted language.
     → Python is a scripting language.
     → Python is dynamically typed.

Number of  Lines

Java
        public class HelloWorld {
             public static void (string[] args)  {
                   // print "Hello World" to the terminal window.
                   System.out.println("Hello, World");
              }
       }
Python
             The program prints Hello, World!
          print ("Hello, World!");

 Semicolon

Java
              class Programming  {
                    // constructor method
                Programming ( )  {
                  System.out.println ("constructor method called");
                       }
                public static void main(string[ ] args)  {
                  Programming object = new programming ( );
                  }
             }
Python
                class Student:
                   # Constructor - Parametrized
                   def _int_(self, name):
                    print ("This is parametrized constructor")
                       self.name = name
                    def show (self)
                      print ("Hello", self.name)
                student = Student ("Irawen")
                   student.show( )

Indentation

0 Comments:

Post a Comment

Popular Posts

Categories

AI (32) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (146) C (77) C# (12) C++ (82) Course (67) Coursera (198) Cybersecurity (24) data management (11) Data Science (106) Data Strucures (8) Deep Learning (13) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (21) Hadoop (3) HTML&CSS (47) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Nvidia (1) Pandas (3) PHP (20) Projects (29) Python (888) Python Coding Challenge (285) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (42) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses