The one advantages of java-why you choose this language

Source: Internet
Author: User

Java is never just a language. There is 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 provide s services such as security, portabilit across operating systems, and automatic garbage collection.

As a programmer, you'll want a language with a pleasant syntax and comprehensible semantics (i.e., not C + +). Java fits the bill, as do dozens of fine languages. Some languages give you portability, garbage collection, and the like, but they don ' t has 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 was what makes Java a irresistible proposition to so many programmers.

1.Simple

We wanted to build a system that could is programmed easily without a lot of esoteric training and which leveraged today ' s Standar practice. So even though we found that C + + is unsuitable, we designed Java as closely to C + + as possible in Oreder to make the Syst EM more comprenhesible. Java omits many rarely used, poorly understood, confusing features of C + +, in off experience, bring more grief than B Enefit.

2.object-oriented

The simple biggest difference between Java and C + + is the Java have a pointer model that eliminates the possibility of O Verwriting memory and corropting data.

3.network-savvy

Java has a 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 sys Tem.

4.Robust:

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

5.Secure:

Java is intended to being used in networked/distributed environments. Toward that end, a lot of emphasis have 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 are excutable on many processors, give n the presence of the Java runtime system. The Java compiler does this by generating bytecode instructions which has nothing to does with a particular computer archit Ecture. Rather, they is desigened to being with both easy-to-interpret on all 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's even a good idea. However, virtual machines has the optin of translating the most frequently executed bytecode sequences to machine code- -a process called Just-in-time compilation. This strategy have proven so effective that even Microsoft's. NET platform relies on the a vitural machine.

Java's virtual machine had 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 for a running program.

7.Portable

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

8.Interpreted

The Java interpreter can execute Java bytecodes directly on all machine to which the interpreter have been ported. Since linking is a more incremental and lightweight process, the development process can being much more rapid and explorator Y.

9.high-performance

While the performance of interpreted bytecodes was usually more than adequate, there was situations where higher performanc E is required. The bytecodes can translated on the Fly (at runtime) to machine code for the particular CPU, the application is Runnin G on.

10.Multithreaded

The benifits of multithreading is 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 was 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 Varia Bles without any effect on their clients. In Java, the fingding out runtime type information is Straighforward.

The one advantages of java-why you choose this language

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.