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 (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (112) C (77) C# (12) C++ (82) Course (60) Coursera (176) coursewra (1) Cybersecurity (22) data management (11) Data Science (85) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (5) flutter (1) FPL (17) Google (18) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (43) Meta (18) MICHIGAN (4) microsoft (3) Pandas (3) PHP (20) Projects (29) Python (719) Python Coding Challenge (154) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)

Followers

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