First week: Java Basics Summary (1)

Source: Internet
Author: User

1. Basic steps of software development:

1. Analyze the problem and set up a data model.

2. Determine the data structure type and algorithm.

3. Write the program.

4. Debug the program.

2.Java language

Java is a simple, object-oriented, distributed, interpreted, secure, portable, high-performance multithreading. It has a strong security

Platform independence, hardware structure independence, Language concise, object-oriented unique features. Widely used by enterprises, companies to develop software, and related systems

Preferred software.

3.Java virtual machine and Java Runtime Environment and development tools

A 1.Java virtual machine can be interpreted as a CPU with a byte-code as a machine instruction.

2. For different operating platforms, there are different virtual machines.

3.Java virtual machines shield the difference between the underlying platform, enabling "one-time compilation, running Anywhere".

Java Virtual Machine Compilation language:

The 4.Java operating environment, as the name implies, can be carried out or can perform Java program work environment, different systems have different operating environment. There are different versions depending on the system version.

5. Development tools for developing software programs. Java Mainstream development tool for Eclipse, because of its strong functionality and compatibility, by many small and medium-sized company developers Love.

Java three major development platforms:

Javase (Java Standard Edition): Mainly used for desktop application development, it is suitable for ordinary PC and notebook computer, as well as the foundation of the Java EE.

Java EE: For servers, focus on distributed software systems at the enterprise level.

Javame (Java mini version): Mainly used for mobile app development, with its unique class library support.

Java syntax:

1. Keywords: for programming languages are reserved language-related keywords, used to denote a special meaning, the keywords are blue, such as public, static, for, if, switch, etc. are Java keywords.

2. Identifiers: identifiers are the words we use when editing Java code, all identifiers. Except for keywords. Identifiers are strictly case-sensitive, beginning with all uppercase letters, numbers and keywords cannot be used at the beginning of identifiers,

Keywords are composed of 26 English-size, digital 0-9_$. Name as much as possible to write to make sense, there is reading, such as: public class HelloWorld inside the HelloWorld is the identifier.

3. Data types and constants and variables:

3.1 Data type: In Java, there are 11 data types that are used for data size representations and data references. Each type of data has a memory size distinction, such as int that represents most of the integer range, and an integer type of 8 bits to represent the size of the memory. A reference type is primarily a string type that represents a reference to a character type. Second, there is a Boolean value of True (True) False (false) that is used to process the judgment separately.

3.2Java constants: constants, as the name implies, are defined in Java that cannot be changed. The so-called amount is in memory for that amount defines a space size and amount of the name, before the data is added to final is a constant. The expression is: final data type volume name = constant value.

3.3Java variables: constants are defined as data type names and values that can be changed continuously within the same type range. As long as the non-final is a variable before the data type, it is declared before the variable. The expression format is consistent with the constants (not previously final).

4. Operator: The operator is divided into increments, decrement operator expressions are: X + +, x--represents the data increments by one unit and decrements one unit in turn. There are also comparison operators, trinocular operators.

5. Note: comments are divided into single-line comments, multiline comments, and text annotations. The code is annotated to facilitate subsequent code viewers to see the code content clearly. Code is also a way of thinking. Single-line and multiline expressions edit the comment content by adding "//" After the code, and the text comment adds "/*" to the comment area to annotate the area by adding "/*" to the end of the comment area. It can also be used for small-scale code debugging.

Java Program flow control related statements

1. Boolean operators: Boolean operations are mainly used to determine whether two conditions satisfy the defined conditions, and then output the value of TRUE or false for the result. The primary expression has a:&& short-circuit and, & and, | or, | | Short Circuit OR,! Non -.

2. Select statement: The SELECT statement is the IF expression, its function is similar to the boolean operator, judging two conditions, if the result is set up or not to separate what output. The expression is: if (judging condition) {Output content}else (or) {output}.

3. Circular statement: loop statements mostly for the main, as the name suggests that the loop is used to cycle to determine whether a condition is set up and then output, until the condition is not established, the user can give a definition of the number of cycles to judge.

Conditional expressions are: for (data type volume name = value; volume name < number of cycles, volume name + + or--), which also has a for nested loop, meaning to add a loop inside the for loop, called the Big Trap Small circle idea.

First week: Java Basics Summary (1)

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.