zoukankan      html  css  js  c++  java
  • The 11 advantages of Java -Why you choose this language

    Java is never just a language.There are lots of programming languages out there, and few of them make much of a splash.Java is a whole platform, with a huge library, containing lots of reusable code, and an execution environment that provides services such as security, portabilit across operating systems, and automatic garbage collection.

       As a programmer, you will want a language with a pleasant syntax and comprehensible semantics(i.e., not C++). Java fits the bill, as do dozens of other fine languages. Some languages give you portability, garbage collection, and the like, but they don't have much of a library, forcing you to roll your own if you want fancy graphics or networking or database access. Well, Java has everything-- a good language, a high-quality execution environment, and a vast library. That combination is what makes Java an irresistible proposition to so many programmers.

    1.Simple

      We wanted to build a system that could be programmed easily without a lot of esoteric training and which leveraged today's standar practice. So even though we found that C++ was unsuitable, we designed Java as closely to C++ as possible in oreder to make the system more comprenhesible. Java omits many rarely used, poorly understood, confusing features of C++ that, in out experience, bring more grief than benefit.

    2.Object-Oriented

      The simple biggest difference between Java and C/C++ is that Java has a pointer model that eliminates the possibility of overwriting memory and corropting data.

     3.Network-savvy

       Java has an extensive library of outines for coping with TCP/IP protocols like HTTP and FTP. Java applications can open and access objects acros the Net via URLs wtih the same ease as when accessing a local file system.

    4.Robust:

          Java is intented for writing programs that must be reliable in a variety of ways.

     5.Secure:

         Java is intended to be used in networked/distributed environments. Toward that end, a lot of emphasis has been placed on security. Java enables the construction of virus-free,tamper-free systems.

    6.Architecture-Neutral

       The compiler generates an architecture-neutral object file format--the compiled code is excutable on many processors, given the presence of the Java runtime system. The Java compiler does this by generating bytecode instructions which have nothing to do with a particular computer architecture. Rather, they are desigened to be with both easy to interpret on any machine and easily translated into native machine code on the fly.

      Of course, interpreting bytecodes is necessarily slower than running machine instructions at full speed, so it isn't clear that this is even a good idea. However, virtual machines have the optin of translating the most frequently executed bytecode sequences into machine code-- a process called just-in-time compilation. This strategy has proven so effective that even Microsoft's .NET platform relies on the a vitural machine.

       Java's virtual machine has other advantages. It increase security because it can check the behavior of instrcution sequances. Some programs even produce bytecodes on the fly, dynamically enhancing the capabilities of a running program.

    7.Portable

       Unlike C and C++, there are no "implementation-dependent" aspects of the specification. The sizes of the primitive data types are specified, as is the behavior of arithmetic on them. For example, an int in Java is always a 32-bit interger. In C/C++, int can mean a 16-bit integer, a 32-bit integer, or any other size that the compiler vendor likes. The only restriction is that the int type must have at least as many bytes as a short int and cannot have more bytes than a long int.

    8.Interpreted

      The Java interpreter can execute Java bytecodes directly on any machine to which the interpreter has been ported. Since linking is a more incremental and lightweight process, the development process can be much more rapid and exploratory.

     

    9.High-Performance

       While the performance of interpreted bytecodes is usually more than adequate, there are situations where higher performance is required. The bytecodes can be translated on the fly (at runtime) into machine code for the particular CPU the application is running on.

    10.Multithreaded

       The benifits of multithreading are better interactive responsiveness and real-time behavior.

       Threads in Java can take advantage of multiprocessor systems if the base operating system does on.

    11.Dynamic 

        In a number of ways, Java is a more dynamice language than C or C++. It was designed to adapt to a evolving environment. Libraries can freely add new methods and instance variables without any effect on their add new methods and instance variables without any effect on their clients. In Java, fingding out runtime type information is straighforward.

     

     

     

     

     

     

      

  • 相关阅读:
    MySQL的FORMAT函数用法规则
    jetbrains idea/webstorm等(注册,激活,破解码,一起支持正版,最新可用)(2017.3.16更新)【转】
    用户价值模型 CITE :https://www.jianshu.com/p/34199b13ffbc
    用户生命周期模型
    机器学习十大常用算法(CITE 不会停的蜗牛 ) interesting
    Linux 安装Oracle11g完整安装图文教程另附基本操作 (分享)
    oracle 命中率
    SQL学习总结笔记
    hash join
    Tomcat详细安装配置
  • 原文地址:https://www.cnblogs.com/Micheal-G/p/4933519.html
Copyright © 2011-2022 走看看