Black Horse Programmer--java Overview

Source: Internet
Author: User

first , the Prelude

Before you learn the Java language, you need to master some common DOS commands, such as:

Dir: Lists the files and folders in the current directory

MD: Create directory (folder)

RD: Deleting a directory

CD: Enter the specified directory

Cd.. : Exits the current directory and returns to the top level directory

Cd\: Go back to the root directory

Del: Delete Files

del*: Delete all Files

del*. file extension: Delete files of the same type

Exit: Exit DOS command line

Echo: Create a file. such as: Echo I can (here is file content) > I can. txt

CLS: Clear Screen

Help: Show all commands and descriptions

Exit: Off

Note: In the DOS command line to delete the folder with Rd, you must ensure that there is no file in the folder, you can delete the file inside, you can also use the del+ folder to delete all the files inside.

Tip: When we want to enter a directory, and the directory name is very long, such as: directory named Woshiheimachengxuyuan, we can use the CD woshi*, with * in lieu of the text of the way to shorthand, efficient.

two .Overview of the Java language

java Birthday : 1995 Sun (Stanforduniversity Network) introduced Java as a high-level programming language.

Java Readme : I am an Internet-facing programming language, I have become the preferred development language for Web applications, I have a simple and easy to learn, completely object-oriented, safe and reliable, can run on any operating system is what you call cross-platform and other characteristics. At present, I mainly have three kinds of technical architecture, see below:

EE (Java 2 Platform Enterprise Edition) is a suite of solutions for developing applications in enterprise environments. The technology system includes the following technologies, such as Servlet JSPs, which are mainly for Web application development.

J2SE (Java 2 Platform standard Edition) is a solution for developing common desktop and business applications. The technology system is the basis of the other two, you can complete the development of some desktop applications, such as the Java version of Minesweeper, QQ and so on.

J2ME (Java 2 Platform Micro Edition) Small edition: A solution for the development of electronic consumer products and embedded devices. The technology system is mainly used in small electronic consumer products, such as mobile phone applications.

These are my old name, in my 5.0 version, Sun company renamed my three kinds of architecture as Java EE, javase, javame, everyone learn to understand me, can become Java EE programmer Oh, is not very good!

Why can Java cross-platform?

Applications written in the Java language can be run on different system platforms, and programs written in the C + + language can only run on Windows systems and will not work on Linux. Why is Java so resourceful? Principle: Java has a separate parser that resolves Java software, called a virtual machine, the JVM (Java Virtual machine Java VM). Just install a JVM on the operating system that needs to run the Java application, and then the JVM will be responsible for running the Java program on that system. This realizes the cross-platform of Java program, also known as Java has good portability.

Java the environment of language construction

Jre:java Runtime Environment Java Runtime Environment, including Java Virtual machine JVM and Java program required core class libraries, such as the need to run a developed Java program, the computer as long as the installation of the JRE.

Jdk:java Development Kit Java SDK, the JDK is provided to Java developers, including Java development tools, also includes the JRE. So with the JDK installed, there is no need to install the JRE separately. The development tools include: Compilation tools (Javac.exe) and packaging Tools (Jar.exe).

The Include diagram:

In short, the JDK contains the JVM that is included in the JRE,JRE and is delivered to the JRE using a Java program developed by the JDK.

Now that the JDK contains everything, we just need to install the JDK.

Third, comments

The role of annotations: 1, annotations, explanations, explain our procedures, improve the reading of the code. ; 2, debug program. For example, the program has an error, such as a comment to find where the error occurs.

There are three ways to annotate: single-line comments, multiline comments, and document comments.

Single-line Comment://Comment text

Multiline Comment:/*-------can have multiple lines of comment text in the middle-------*/Note: Multiline comments do not nest multiple lines of comments.

Document comments: Java-specific annotations, usually written before classes, fields, constructors, methods, definitions. Note content can be resolved by the tool Javadoc.exe in the JDK, generating a set of documentation that is described in the form of a Web file. Format: Example

/**

Version:

Role:

such as

*/

Beginners should develop the habit of writing comments before writing code, because code is just a form of thought. Put your thoughts through the comments first, and then use the code to reflect, not every line is annotated, and not every line is not annotated.

Starter Program:

Run:

Black Horse Programmer--java 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.