Java and Python have always been two very popular and powerful programming languages, so what are their differences?
Here are some of my summaries, some of which are based on reference to others (thank you here!!!)
java and python The difference: (Recommended learning: Python video tutorial)
1.Python is simpler than Java, with low learning cost and high development efficiency
2.Java running The efficiency is higher than that of Python, especially programs developed in pure Python, which are extremely inefficient
3.There are many Java-related materials, especially Chinese materials
4.The Java version is relatively stable, and Python2 and 3 are not Compatibility leads to the failure of a large number of class libraries
5.Java development is biased toward software engineering and team collaboration, and Python is more suitable for small-scale development
6.Java is biased towards commercial development, and Python is suitable for data analysis
7.Java is a statically typed language, Python is a dynamically typed language
8.All variables in Java need to be declared (type) before they can be used, while variables in Python do not need to be declared. Type
9. Java can only be run after compilation, and Python can be run directly;
10. Blocks in JAVA are enclosed in braces, and Python is represented by a colon and four spaces indentation.
11. JAVA types need to be declared, but Python types do not.
12. Each line of JAVA statements ends with a semicolon, while Python does not need to write a semicolon.
13. When implementing the same function, JAVA generally requires more keystrokes than Python.
For more Python related technical articles, please visit the Python Tutorial column to learn!
The above is the detailed content of The difference between java and python. For more information, please follow other related articles on the PHP Chinese website!