1th Chapter Java Programming Overview

Source: Internet
Author: User

    • Java year of birth: 1996
1.1 Java Programming Platform
    • Java is not just a language, Java is a complete platform:
    1. There is a huge library that contains many reusable code, such as drawing functions, network connectivity, database access functions
    2. High-quality execution environment: one that provides services such as security, cross-operating system portability, and automated garbage collection
1.2 Java "white paper" key terminology 1. Simplicity
    • Java syntax is a pure version of C + + syntax
2. Object-oriented
    • Object-oriented is a programming technique that focuses on data (that is, objects) and on object interfaces.
3. Network Skills
    • Java has an extended example libraries for dealing with TCP/IP protocols such as HTTP and FTP.
    • Java applications are able to open and Access objects on the network through a URL, which is as convenient as accessing a local folder.
    • Java has made it so easy to open a socket with a heavy task like this.
    • The remote method invocation mechanism enables communication between distributed objects.
4. Robustness (reliability)
    • The Java compiler detects many problems that can be detected only at run time in other languages.
    • The biggest difference between Java and C + + is that the pointer model used by Java can eliminate the possibility of rewriting memory and corrupting data.
Language Type Description
C Language with display pointer You need to use pointers to access strings, arrays, objects, and even files
Vb Language with no pointer displayed You do not have to use pointers to access these entities, nor do you care about memory allocation issues. But without pointers to languages, many data structures are difficult to implement.
Java Have the advantages of both sides You do not need pointers to construct structures such as strings and arrays. But if necessary, the ability to have pointers, such as linked lists. Java is absolutely secure and never accesses a "bad" pointer, causing memory allocation errors and avoiding memory leaks (garbage collection mechanism).
5. Security
    • Java is suitable for network/distributed environments. Use Java to build anti-virus, tamper-proof systems
6. Architecture Neutrality
    • The compiler generates an architecture-neutral destination file format (bytecode), which is simply compiled code that can run on many processors as long as there is a Java Runtime System (JRE). The well-designed bytecode can be easily interpreted and executed on any machine, and can be quickly translated into the code of the local machine.
    • Of course, explaining bytecode will certainly be much slower than running a machine instruction at full speed.
    • Instant compilation: The virtual machine has an option to translate the most frequently used bytecode into machine code.
7. Portability
    • There is no "dependency-specific implementation" in the Java specification. The size of the base data type and the algorithms are clearly explained. For example, an int in Java is always a 32-bit integer.
    • The data type has a fixed size, the binary data is stored and transmitted in a fixed format, and the string is stored in the standard Unicode format.
8. Explanatory type
    • The Java interpreter can execute Java bytecode on any machine that has ported the interpreter.
9. High Performance
    • Bytecode can be quickly translated at run time to the specific CPU machine code that runs the application.
10. Multithreading
    • Multithreading can lead to better interactive responses and real-time behavior.
    • Threads in Java can take advantage of multiple processors as long as the operating system supports it.
    • At the bottom, the main platform of the thread implementation mechanism are different, Java does not implement platform-independent, on different platforms, the call multithreaded code is exactly the same; Java has given the implementation of multithreading to the underlying operating system or line libraries to complete.
11. Dynamic Nature
    • Finding run-time type information in Java is straightforward
1.3 Java applets and the Internet
    • Java has become the most popular language for developing server-side applications, and using these server-side applications can generate Web pages and run back-end logic.
1.4 Java Development History 1.5 common misconceptions about Java

1th Chapter Java Programming Overview

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.