current position:Home>Introduction to the differences between Python and Java
Introduction to the differences between Python and Java
2022-05-15 04:22:04【ysds20211402】
from : Micro reading https://www.weidianyuedu.com
A lot of beginners are asking :“Python and Java What's the difference ? Is it learning? Python still Java.“
A melancholy look , It's hard to do .
today , I have summed up twelve differences between the two .
One 、 To be honest ,Python virtual machine No, java strong ,java Virtual machine is java At the heart of
Python The core of is that you can easily use c Language function or c++ library .
Two 、Python It is fully dynamic
You can modify your own code at run time ,java It can only be achieved by workarounds .
Python The variables are dynamic , and java The variable is static , It needs to be stated in advance , therefore java ide The code prompt function of is better than Python ide.
3、 ... and 、 design idea
Python For decades , Decades ago, process oriented was the mainstream , So use Python Many programs use process oriented design methods , Many concepts range from c Language comes from ,class stay Python Is added after , and java In order to achieve a pointer free c++( That year com Reference count for component ,java The virtual machine used ), It mainly adopts the object-oriented design method , Many concepts are oop The concept of .
Process oriented , Relatively simple and intuitive , But it's easy to design a noodle program , object-oriented , Relatively abstract and elegant , But it's easy to be too abstract .
Four 、 In actual use Python Easy entry
But learn to use Python work , Need to learn again Python Various libraries ,Python The power of lies in the library , Why? Python The library is powerful , as a result of python The library can be used python,c Language ,c++ Wait for the design , And then to python Use .
So no matter gpu function , neural network , Intelligent algorithm , Data analysis , The image processing , Scientific Computing , All kinds of warehouses are waiting for you to use .
and java No, Python So many open source libraries , Many libraries are used internally by commercial companies , Or publish it is just a jar package , Can't see the original code .
Python The virtual machine is not because of compilation java Good support ( Or deliberately designed ), Generally use the source code directly (linux), Or simply pack the source code ( Such as pyexe).
5、 ... and 、Python There are many virtual machine implementations
Such as cython,Pyston,pypy,jython, IronPython wait , Suitable for business languages , Or plug-in language , Or domain oriented language , and java Because virtual machines are huge , Rarely used in plug-in languages , It's not convenient to publish .
6、 ... and 、java It is mainly used in areas with strong business logic
Such as mall system ,erp,oa, Finance , Insurance and other traditional database transaction fields , Through something like ssh Framework transaction code , For commercial databases , Such as oralce,db2,sql server Better support , Strong software engineering concept , Multi person development mode suitable for software engineers .
Python It is mainly used for web Data analysis , Scientific Computing , Financial analysis , Signal analysis , Image algorithm , Mathematical calculation , Statistical analysis , Algorithmic modeling , Server operation and maintenance , Automation , Strong concept of rapid development , Suitable for rapid development team or individual agile mode .
7、 ... and 、java Commercial companies support more
Such as sap,oracle,ibm etc. , There are commercial containers , middleware , Enterprise framework ejb.python Many open source organizations support , Such as qt,linux,google, Many open source programs support python, Such as pyqt,redis,spark etc. .
8、 ... and 、Python The most useful is the script ,java The most useful is web
Python It's glue , You can stick all kinds of irrelevant things together ,java It's gay , You can form a team of hundreds of people through software engineering and you pk, The commercial atmosphere is heavy .
But I think it's still Python Powerful , Because it is convenient to call c or c++ The library of , But software engineering and commercial operation do not java good , Suitable for rapid development .
Nine 、 About money
If you want to write programs and sell software java, Available on ibm The server , On oracle database , On EMC Storage , high price , Commercial purchasing companies like this kind of tall .
If you want to program money directly, use Python,Python It can realize kuanke Finance , Data back testing , Stock speculation , Speculation option , Stir fried gold , Stir fry bitcoin , Hedge arbitrage , Statistical arbitrage , There are many open source libraries , Data analysis library , Machine learning library can refer to .
Ten 、java and Python, Can run on linux operating system
But many linux It can support Python,java Self installation required .
Java and Python be better than c# The reason is greater than support linux, Support osx, Support unix, Support arm.java and python Than c++ The reason for its popularity is that there is no need for pointers .
11、 ... and 、 For mobile Internet
Python It can only run on Android or through the runtime ios,java Native support for Android development , But it can't be used. ios in .
Twelve 、 For big data
Hadoop use Java Developed , Spark use Scala Development ,Scala be based on JVM,Flink Is based on Java. Big data development Java,Python It is mainly used for big data analysis .
copyright notice
author[ysds20211402],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/131/202205111429501823.html
The sidebar is recommended
- [brush question Python] the problem of cutting and selling pipes to maximize profits
- Python regular expression
- [Python GUI] wxPython automated data generator practice
- Python script compilation process
- [Python faiss library] (I) Introduction
- Python moves (copies) the pictures (files) under one file to another folder
- Python crawling 51job position information (regular violence matching)
- Python Post Bar irrigation script
- Python simulation QR code login Baidu
- Python calls wechat to send message call through COM port
guess what you like
Analysis of birthday paradox in Python
Equal scale compression of image files in Python
Python dynamic programming (knapsack problem and longest common substring)
Introduction to Python Programming and data analysis (I) basic use of built-in functions
Introduction to Python Programming and data analysis (II) basic use of list derivation
Introduction to Python Programming and data analysis (III) basic use of branch and process control
Python turtle painting Chinese characters
[a quick introduction and comparison of multiple languages -- JavaScript, typescript, python, golang, trust, Java, ruby]
Relevant knowledge of Python web development (I)
python3. Understanding of ID function in 6
Random recommended
- JSON data storage of MySQL in Python
- Python 3 development function
- My pandas
- Python game programming (pyGame)
- Python word cloud
- Python crawler crawls the Douban movie ranking list and writes it into CSV file for visual data analysis
- Python crawler crawls Beijing Xinfadi vegetables and displays them visually
- Python climbed the world university rankings
- Python crawling material commune picture
- Exception handling in Python and explanation of OS module
- Summation of corresponding position elements of multiple lists in Python
- [Python pandas] read excel table contents
- Python zip() function usage
- Application of Python startup subclass subprocess class
- Python's logging module
- MySQL application of Python
- Interesting games designed in Python
- Regularity of Python
- Build Python project in Jenkins, pychar output is normal and Jenkins output modulenotfounderror: no module named problem
- Jenkins reported an error in building Python project: CX_ Oracle. DatabaseError: DPI-1047: oci. dll is not the correct architecture
- Interface request processing of Python webservice
- Hamcrest assertion Library of Python
- Download third-party libraries offline in Python
- Web automation in Python
- Importlib.exe in Python import_ Module import module
- Operation of OS Library in Python
- Some integration operations on Web pages in Python
- Python realizes the super fast window screenshot, automatically obtains the current active window and displays the screenshot
- Implementation of workstation monitoring system with Python socket
- Resume Automation - word 92
- Django foundation -- 02 small project based on Database
- Python drawing word cloud
- Django foundation -- 02 small project based on Database
- MNIST dataset classification based on Python
- Design of FTP client server based on Python
- Signing using RSA algorithm based on Python
- Website backend of online book purchase function based on Python
- Implementation of Tetris game based on Python greedy search
- Django Foundation
- Case: Python weather broadcast system, this is a rainy day