Home  >  Article  >  What is the difference between java and python

What is the difference between java and python

hzc
hzcOriginal
2020-06-22 17:06:446280browse

What is the difference between java and python

What is the difference between java and python?

(1) The python virtual machine is not as powerful as java, and the java virtual machine is the core of java , the core of Python is that you can easily use C language functions or C libraries.
(2). Python is fully dynamic and you can modify your own code at runtime. Java can only be implemented through workarounds. Python's variables are dynamic, while Java's variables are static and need to be declared in advance, so the code prompt function of Java IDE is better than that of Python IDE.
(3), Python has been around for decades. Process-oriented was the mainstream decades ago, so there are many programs using Python that use process-oriented design methods. Many concepts come from the C language. Classes are in Python. It was added later, and Java was designed to implement C without pointers (the reference counting used by COM components, the virtual machine used by Java), mainly using object-oriented design methods, and many concepts are oop concepts. Process-oriented, relatively simple and intuitive, but easy to design noodle programs, object-oriented, relatively abstract and elegant, but easy to be over-abstracted.
(4), it is easy to get started with python in actual use, but to learn to work with python, you need to learn various python libraries. The power of pyhton lies in the library. Why python libraries are powerful? The reason is that python libraries can be used Python, C language, C and other designs are then provided for Python to use, so whether it is GPU operation, neural network, intelligent algorithm, data analysis, image processing, scientific calculation, various libraries are waiting for you to use. Java does not have as many open source libraries as Python. Many libraries are used internally by commercial companies, or are released as just a jar package, and the original code cannot be seen. Because the Python virtual machine does not have good compilation support as Java (or it is deliberately designed this way), the source code (linux) is generally used directly, or the source code is simply packaged (such as pyexe).
(5). Python has many virtual machine implementations, such as cython, Pyston, pypy, jython, IronPython, etc., which are suitable for business languages, plug-in languages, or domain-oriented languages. However, Java has a huge virtual machine and is very difficult to implement. It is rarely used in plug-in languages ​​and is not convenient to publish.
(6). Java is mainly used in areas with strong business logic, such as shopping mall systems, erp, oa, finance, insurance and other traditional database transaction fields. Through transaction codes similar to ssh framework, it can be used for commercial databases such as oralce, db2, SQL Server has good support, strong software engineering concepts, and is suitable for software engineering-style multi-player development mode. Python is mainly used for web data analysis, scientific computing, financial analysis, signal analysis, image algorithms, mathematical calculations, statistical analysis, algorithm modeling, server operation and maintenance, automated operations, strong rapid development concepts, and is suitable for rapid development teams or individual agile models. .
(7). Java is supported by many commercial companies, such as SAP, Oracle, IBM, etc., with commercial containers, middleware, and enterprise framework ejb. There are many open source organizations that support python, such as qt, linux, and google. Many open source programs support python, such as pyqt, redis, spark, etc.
(8). Python is most used for scripts, Java is most used for web, pyhotn is the glue that can stick all kinds of unrelated things together, and java is gay and can be used to form hundreds of pieces through software engineering. A personal team competes with you, with a strong commercial atmosphere. However, I think Python is still more powerful because it can easily call C or C libraries, but software engineering and commercial operations are not as good as Java and is suitable for quick development.
(9), about money. If you want to write programs and sell software using Java, you can use IBM servers, Oracle databases, and EMC storage. The price is high, and commercial procurement companies like this kind of high-end. If you want to directly use a program to generate money, use Python. Python can implement quant finance, data backtesting, stock trading, options trading, gold trading, Bitcoin trading, hedging arbitrage, and statistical arbitrage. There are many open source libraries, data analysis libraries, and machines. You can refer to the learning library.
(10), Java and Python can all run on the Linux operating system, but many Linuxes can natively support Python, and Java needs to be installed by yourself. The reason why java and python are stronger than c# is that they support linux, osx, unix, and arm. The reason why Java and Python are more popular than C is that they do not require pointers.
(11). For the mobile Internet, python can only run on Android or ios through the runtime library. Java natively supports Android development, but cannot be used on ios.

(12). For big data, hadoop is developed with java, and spark is developed with Scala. It is more convenient to call spark with python for analysis.

The above is the detailed content of What is the difference between java and python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn