What are the advantages of Java compared to Python3?

Source: Internet
Author: User
What are the main areas and what kind of scenarios are these advantages?

Reply content:

Both sides can list many advantages, but the problem is too hasty ...

Here's a few words for Java:
The quality of the JVM is much better than Python's virtual machines. A high-quality python interpretation environment can be built in the JVM environment, not in the reverse.
Java is more friendly to the IDE.





You want to cheat Python programmer to work overtime, have to talk about life ideal, talk about equity, talk about overtime, talk about feelings. Talk to a Java programmer about working overtime and tell him it's a programming specification. There is no one better than who, only who is more comfortable.
Java: With a lot of people, platform, tools, library is very mature. More Enterprise-class applications
Python3: Flexible, now in vogue, background development with it is also very fast. Small projects can easily be written into large projects. Python writes simple scripts, small projects are convenient, and iterations are fast.
When the project is large to a certain extent, Java has an advantage, and the project is easy to maintain and manage.


Dynamic types are easy to use, but it's not reassuring that Java is better than python in almost any situation except for 500-line ad-hoc scripts
    1. The absolute performance is good, again the real multithreading
    2. The vast majority of Java libraries are pure (that is, plain Java bytecode) and can be deployed to the target machine without worrying about running. Jar format can be arbitrarily merged
    3. JMX implanted object Monitor/controller
    4. A strong static type system means that the compiler and the static checker automatically help you write n multiple tests
    5. No 2 or 3 version large split (lore)
People who say Java is bad are often bothered by Java's common framework-this can be replaced by a lightweight framework that is written by itself. Some people think that some Java IDE is not sexy, this is a modern version of Maiduhuanzhu (and I thought IntelliJ idea good enough) I have a more "radical" view: If you use object-oriented approach to develop software, especially those large-scale complex logic and processing process of the software system , from analysis, design, to implementation, the object-oriented line through the down, then please put the dynamic type of programming language such as Python to forget it, dynamic language flexibility in this case, the result is not the benefits of trouble, using java/c# is more appropriate choice.
For two examples, using object-oriented approach to the analysis and design of software systems, a basic principle is: the duties of classes and objects must be as clear as possible。 There is also a basic principle: find the point of change and encapsulate it, so that its changes have minimal impact on other parts of the system.
Do you see it? In order to improve the maintainability of the system, we want to control the impact of the "variable" factor on the system as much as possible. So, is there a conflict between a method and a property that can be added and removed at any time with object-oriented design principles?
You have to think in the analysis of the design: "Yo, I use dynamic programming language implementation, so object methods and properties can be changed at any time, I want to follow this feature design", of course, no one stopped you to do so. But those who have done real business projects must have realized that it is not a few more than 10 classes, usually hundreds of thousands of classes, and there is a complex association between them, the interaction between the objects they create is quite complex, and usually must follow a bunch of business rules, even if it is based on a relatively stable static class for analysis design, has been enough head, You come to a few "dynamic" of the "chameleon" stirred in the inside, that taste, feel it! This, in turn, would be easier to ask. The application of both is very wide. All are kind of tiger balm, as long as you dare to think, you can use.
Of course, there are many more Java development libraries. In other words, Python came out in 91, earlier than both Java and PHP. It's only now. I always thought it was a relatively new language.

Then, on big project development, Java is more appropriate. Even if it's not that dense computational type, it's better than C + +.
Because Java development is less efficient than python.
But both can be despised by C + +.
So for startups, C + + in the early stage is completely free of consideration, when to use? User Tens. But most of the time I didn't live on my knees. So Python and Java are a good choice for startups.

Then, Java is more suitable for large projects, because Java in the medium-term, users in the millions, but never to. Found concurrency, memory is not enough, but it seems to optimize a can also use the time.
Although Python can expand C, it is still a problem.
At this point, the power of the JVM appears. Can be all kinds of optimization, find a familiar with the JVM, optimize efficiency can improve a lot.

Big point of the project, are selected C + + or Java-based, and then Python or Lua to do scrap, mend. Java wrote a program to crawl small information, the expansion of the time I heard that Python is good, want to try to take it.
The results have been written for three days, the console has not yet played in Chinese, it is said that the problem of BeautifulSoup Java jobs, find work.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.