Dark Horse programmer-Java overview, dark horse java Overview

Source: Internet
Author: User

Dark Horse programmer-Java overview, dark horse java Overview

I,Prelude

Before learning the Java language, you must first master some common doscommands, such:

Dir: list files and folders in the current directory

Md: create a directory (folder)

Rd: delete a directory

Cd: Enter the specified directory

Cd ..: exit the current directory and return to the upper-level directory.

Cd \: Return to the root directory

Del: delete an object

Del *: delete all objects.

Del *. File Extension: delete files of the same type.

Exit: exit the doscommand line.

Echo: create a file. For example, echo I can (here is the file content)> I can. txt

Cls: clear screen

Help: Display All commands and descriptions

Exit: Disable

Note: When Using rd to delete a folder in the doscommand line, you must ensure that there are no files in the folder. In this case, you can delete the files in a single folder, you can also delete all files in the folder by using del +.

Tip: when we want to enter a directory with a long name, for example, woshiheimachengxuyuan, we can use cd woshi * and use * to replace the following text for short, which is efficient.

II,Java language Overview

Java birthday: In 1995, SUN (StanfordUniversity Network) launched Java, a high-level programming language.

Java self-report: I am an Internet-oriented programming language. At present, I have become the preferred development language for Web applications. I am easy to learn, fully object-oriented, secure and reliable, running on any operating system is what you call cross-platform. Currently, I have three main technical architectures:

J2EE (Java 2 Platform Enterprise Edition) Enterprise Edition: provides a solution for developing applications in an Enterprise environment. The technologies included in the technology system, such as Servlet Jsp, are mainly used for Web application development.

J2SE (Java 2 Platform Standard Edition) Standard Edition: a solution for developing common desktop and business applications. The technical system is the basis of other two technologies and can be used to develop some desktop applications, such as Java version clearance and QQ.

Java 2 Platform Micro Edition: it is a solution for developing electronic consumption products and embedded devices. This technology system is mainly used for small electronic consumer products, such as applications in mobile phones.

These are my old names. In my 5.0 version, SUN renamed my three architectures JAVAEE, JAVASE, and JAVAME, they can all become Java EE programmers. Isn't that nice!

Why is Java cross-platform?

Applications written in the Java language can run on different system platforms, while programs written in C ++ can only run on windows systems, which won't work on linux. Why is Java so fascinating? Principle: Java has its own independent parser that can parse Java software. It is called a Virtual Machine (JVM ). You only need to install a JVM on the operating system that runs the Java application. Then, the JVM is responsible for running the Java program in the system. This achieves the cross-platform Java program, also known as Java, with good portability.

JavaBuild a language environment

JRE: Short for the Java Runtime Environment, including the core class libraries required by the JVM and Java programs of the Java Virtual Machine. If you want to run a developed Java program, you only need to install JRE in the computer.

JDK: Short for Java Development Kit. JDK is provided to Java developers, including Java Development tools and JRE. Therefore, after JDK is installed, you do not need to install JRE separately. The development tools include compilation tool (javac.exe.pdf and packaging tool (jar.exe.

The include relationship diagram:

In short, JDK includes JRE, JRE includes JVM, and Java programs developed using JDK are handed over to JRE for running.

Since JDK contains all, we only need to install JDK.

3. Notes

The functions of Annotations: 1. Annotations, descriptions, and explanations of our programs improve the readability of the Code .; 2. debug the program. For example, if an error occurs in a program, you can use annotations to locate the error.

There are three ways to comment: single-line comment, multi-line comment, and document comment.

Single line comment: // comment text

Multi-line comments:/* ------- there can be multiple lines of comments in the middle ------- */Note: Do not nest multi-line comments.

Document annotation: a Java-specific annotation, usually written before classes, domains, constructors, methods, and definitions. The description content can be parsed by javadoc.exe, a tool in JDK, and a set of description documents for this program, which are reflected in Webpage files. Format: Example

/**

Author:

Version:

Purpose:

And so on

*/

Beginners should develop the habit of writing comments before writing code, because code is only a form of thought. Sort out your ideas through comments, and then use code to reflect them. Do not add comments to each line, or add comments to each line.

 

Entry Program:

Run:

 

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.