Javase Basics of the Java Learning Path 1

Source: Internet
Author: User
Tags arithmetic arithmetic operators binary to decimal bitwise clear screen create directory mixed

The Javase foundation of

<div>

# # #01.01_ Computer Basics (Computer overview) (Learn)
* A: What is a computer? Examples of computer applications in life
* Computer (computer) Full name: Electronic computer, commonly known as computers. It is a modern intelligent electronic device which can operate according to the program, automatically and high-speed processing massive data. A computer consisting of hardware and software that does not have any software installed is called bare metal. Common forms are desktop computers, laptops, mainframe computers, and so on.
* Application Examples
* 1: Scientific calculation
* 2. Data processing
* 3, Automatic control
* 4. Computer Aided design
* 5, Artificial intelligence
* 6, multimedia applications
* 7. Computer network
* ...
* B: What is hardware? Examples of hardware
* Computer hardware (computer Hardware) refers to a computer system consisting of electronic, mechanical and optoelectronic components, such as a variety of physical devices collectively. These physical devices constitute an organic whole to provide the material basis for the computer software operation according to the requirements of the system structure.
* von Neumann architecture
* The hardware of the computer is divided into 5 components: an operator, a controller, a memory, an input device, and an output device.

* Operators and controllers are the core of the computer, collectively referred to as central processing unit (processing UNIT,CPU) or processor. There are also some high-speed storage units inside the CPU, called registers. Where the operator performs all arithmetic and logic operations, the controller is responsible for removing the instruction from the memory, decoding and issuing various control commands to the computer, while the register provides the processing unit with the data required for operation.
* Memory is the memory part of a computer, used to store the program and the data involved in the program. It is divided into internal memory and external memory. The internal memory is used to store the program being executed and the data used, its cost is high, the capacity is small, but the speed is fast. External memory can be used for long-term preservation of a large number of programs and data, low cost, large capacity, but slower.
* Input devices and output devices are collectively referred to as external devices, referred to as peripheral or I/O devices, for human-computer interaction and inter-machine communication. Microcomputers commonly used in the input device has a keyboard, mouse, etc., the output device has a display, printer and so on.
* C: What is software? Software classification and examples
* Computer software (computer software) is an essential thing in the process of using computer, computer software can enable the computer to complete the specific function in a predetermined order
* Computer software is divided into system software and application software according to its function.
* System software: DOS (Disk Operating system), Windows, Linux, Unix, Mac, Android, IOS
* Application software: Office QQ chat YY language minesweeper
# # #01.02_ Computer Basics (software development and Computer language Overview) (Learn)
* A: what is software
* Collection of computer data and instructions organized in a specific order
* B: What is development
* Process of software production
* C: What is software development
* Build software with development tools and computer language
* D: What is computer language
* A special language for communication of information between people and computers
* E: Classification of computer languages
* Machine Language:
* Machine language is a computer language directly expressed as a binary code instruction, which is a string of code consisting of 0 and 1, which have a certain number of digits and are divided into segments, and the coding of each segment represents different meanings.
Assembly language
* Assembly language is the use of some special symbols to replace the machine language binary code, the computer can not directly recognize the need for a software to translate assembly language into machine languages.
* Advanced Language:
* The source code is written in plain English, and the source code is translated by the compiler into a machine language that is directly recognized by the computer and then executed by the computer.
* Advanced languages include C,c++,c#,java
# # #01.03_ Computer Basics (man-machine Interaction) (understanding)
* A: Two ways of human-computer interaction
* A: Command line mode
* Need to have a console, enter specific instructions, let the computer do some operations. More trouble, need to record some commands.
* B: Graphical interface mode
* This method is simple and intuitive, the user is easy to accept, easy to operate.

# # #01.04_ Computer Basics (keyboard function keys and shortcut keys) (master)
* A: Keyboard function keys
* A:tab
* B:shift
* C:ctrl
* D:alt
* E: space
* F:enter
* G:window
* H: up or down key
* I:PRTSC (Printscreen) screen
* B: Keyboard shortcuts
* A:ctrl+a Select All
* B:ctrl+c Copy
* C:ctrl+v Paste
* D:ctrl+x Cut
* E:ctrl+z Revocation
* F:ctrl+s Save

# # #01.05_ Computer Basics (How to open the DOS console) (master)
* How do I open the DOS console under A:XP?
* A: Start--Program--Attachments--command prompt
* B: Start-run--cmd--Enter
* c:win+r--cmd--Enter
* How do I open the DOS console under b:win7?
* A: Start-All Programs--attachments--command prompt
* B: Start-search programs and files--cmd--enter
* c:win+r--cmd--Enter
* C:win8 How to open the DOS console
* A: Left mouse click Start--down arrow--command prompt
* B: Mouse Right click Start--Search--cmd--Enter
* C: Mouse Right click Start-run--cmd--Enter
* d:win+r--cmd--Enter
* D:WIN10 How to open the DOS console
* A: Mouse Right click Start--Search--cmd--Enter
* B: Mouse Right click Start-run--cmd--Enter
* c:win+r--cmd--Enter

# # #01.06_ Computer Basics (Common DOS commands explained)
* A:D: Enter drive letter Toggle
* B:dir (Directory): Lists the files and folders in the current directory
* C:CD (change directory) changes the specified directory (enter the specified directory)
* D:CD. : Back to the top level directory
* e:cd\: Go back to the root directory
* F:cls: (Clear screen) clear
* G:exit: Exit DOS command line (need to master on split Line, understand below)
* /=========================================================
* MD (make directory): Create directory
* RD (remove directory): Delete directory
* DEL (delete): Delete files, delete a bunch of suffix names like files *.txt
* Notepad Create File
* Delete a folder with content
* Rd +/S folder name (ask whether to delete)
* RD +/q +/S folder name (delete directly)

# # #01.07_java Language Basics (Java language Overview) (Learn)
* A:java Language history
* James Goslin James Gosling received a BS in computer Science from the University of Calgary in 1977, a PhD in computer science from Carnegie Mellon University in 1983, and worked at IBM after graduating to design IBM's first generation workstation news system, but with no regard for attention. Later transferred to Sun, 1990, and Patrick,naughton and Mike Sheridan and other people to cooperate "Green plan", later developed a set of languages called "Oak", then renamed Java.
* SUN (Stanford University Network, Stanford University Internet company)
* B:java language version
* JDK 1.1.4Sparkler Gem 1997-09-12
* JDK 1.1.5Pumpkin Pumpkin 1997-12-13
* JDK 1.1.6Abigail Abigail--Women's name 1998-04-24
* JDK 1.1.7Brutus Brutus--Roman statesman and general 1998-09-28
* JDK 1.1.8Chelsea Chelsea-city name 1999-04-08
* J2SE 1.2Playground Stadium 1998-12-04
* J2SE 1.2.1none No 1999-03-30
* J2SE 1.2.2Cricket Cricket 1999-07-08
* J2SE 1.3Kestrel American Red Falcon (SǓN) 2000-05-08
* J2SE 1.3.1Ladybird Ladybug 2001-05-17
* J2SE 1.4.0Merlin Grey back Falcon 2002-02-13
* J2SE 1.4.1grasshopper Grasshopper 2002-09-16
* J2SE 1.4.2Mantis Mantis 2003-06-26
* Javase 5.0 (1.5.0) Tiger Tigers
* Javase 5.1 (1.5.1) Dragonfly Dragonfly
* Javase 6.0 (1.6.0) Mustang Mustang
* Javase 7.0 (1.7.0) Dolphin Dolphin
* Javase 8.0 (1.8.0)
* Javase 9.0 (1.9.0)
* C:java Language Platform
* J2SE (Java 2 Platform standard Edition) edition
* is a solution for the development of common desktop and business applications, which is the basis of the other two, and can complete the development of some desktop applications
* J2ME (Java 2 Platform micro Edition) Mini version
* is a solution for the development of electronic consumer products and embedded devices
* EE (Java 2 Platform Enterprise Edition) Corporate Edition
* is a set of solutions for applications in developing enterprise environments, including technologies such as Servlets, JSPs, etc., primarily for web application development
* C:java Language Features
* Simple Nature
* Explanatory nature
* Object Oriented
* High Performance
* Distributed processing
* Multithreading
* Robustness
* Dynamic
* Structural neutrality
* Security
* Open Source
* Cross-platform
# # #01.08_java Language Basics (Java language Cross-platform principle) (master)
* A: What is cross-platform
* B:java Language Cross-platform principle
* Just install a Java Virtual machine (JVM Java VM) on the operating system that needs to run the Java application. The JVM is responsible for the operation of the Java program in the system.
* C:java language cross-platform illustration
* Write once, run anywhere! (one compile, run everywhere)
# # #01.09_java Language Basics (Overview of JRE and JDK) (master)
* A: What is the JRE
* Including Java virtual machines (JVM Java) and Java programs required by the core class library, if you want to run a well-developed Java program, the computer only need to install the JRE.
* jre:jvm+ class Library.
* B: What is a JDK
* JDK is available to Java developers and includes Java development tools and JRE. So with the JDK installed, you don't have to install the JRE separately.
* Development tools: Compiler tool (Javac.exe) packaging Tool (Jar.exe), etc.
* Development tools for Jdk:jre+java.
* C: Why the JDK contains a JRE
* Why does the JDK contain a JRE?
* After the development of the program, you need to run a look at the effect.
* Role and relationship of D:JDK,JRE,JVM
# # #01.10_java Language Basics (Download and installation process diagrams for JDK) (learn)
* Download of A:JDK
* A: Official website http://www.oracle.com
* B: Demo download process
* Installation of B:JDK
* A: Fool-type installation
* Double click on the installer, then all the way next (but not recommended)
* B: Recommended way to install
* Installation path do not have Chinese or special symbols such as spaces.
* All development related software is best installed directory unified.
* Example: my JDK installation path
* D:\develop\Java\jdk1.7.0_72
* When prompted to install the JRE, you can choose not to install. Recommended or installed.
* C: Demo installation process
* You can set up a folder on the D drive first develop
* Then demonstrate the installation process
* C: Verify the installation is successful
* A: Through the DOS command, switch to the JDK installation bin directory.
* D:\develop\Java\jdk1.7.0_72\bin
* B: Then enter Javac and Java separately, if some content is displayed correctly, the installation is successful.

# # #01.11_java Language Basics (Directory interpretation under JDK installation path) (learn)
* A:bin Directory: This directory is used to store some executable programs.
* such as Javac.exe (Java compiler), Java.exe (Java Runtime Tool), Jar.exe (Packaging tool) and * Javadoc.exe (document Generation tool), etc.
* B:DB directory: DB directory is a small database.
* Starting with JDK 6.0, a new member javadb is referenced in Java, a pure Java implementation, open source database management system. This database is not only lightweight, but also supports all JDBC 4.0 specifications, when learning jdbc, no more need to install a database software, choose to use JAVADB directly.
* C:jre directory: "JRE" is the abbreviation for Java Runtime environment, meaning Java Program Runtime environment. This directory is the root of the Java Runtime Environment, which includes Java virtual machines, runtime class packages, Java application initiators, and a bin directory, but does not include development tools in the development environment.
* D:include directory: Because the JDK is implemented through C and C + +, you need to introduce some C-language header files at startup, which is used to store these header files.
* E:lib Directory: LIB is the abbreviation for the library, meaning the Java class library or library file, which is the archive package file used by the development tool.
* F:src.zip file: Src.zip is a compressed file for the SRC folder, and the source code of the JDK core class is placed in SRC, which allows you to view the source code of the Java base class.

# # #01.12_java Language Basics (Introduction to Java Development tools) (Learn)
* A:NOTEPAD (Microsoft OS comes with)
* b:editplus/notepad++
* C:eclipse
* D:myeclipse
* E:intellij Idea
* Give us a brief introduction to these tools and then tell us the order in which we use them.
* Basic class: First Notepad, then EditPlus, then Eclipse/idea.
* Employment classes: MyEclipse and Eclipse are used.

# # #01.13_java Language Foundation (HelloWorld case writing and running) (master)
* A: Define Class
* B: Write the Main method
* C: Write output statement
* D:java Program Development operation and working principle
* E: Compile and run the program

Class HelloWorld {//define Classes
public static void Main (string[] args) {//define Main method
System.out.println ("HelloWorld"); Output the "HelloWorld" statement on the DOS console
}
}

Compile and run the program in the DOS console to switch to the Java class directory:
Execute Javac Helloworld.java//compile HelloWorld source code, under normal circumstances will generate a name in the directory named. class file, if the error is the program source code has a problem needs to be modified.
Executing Java HelloWorld//Running the Java program will output the "HelloWorld" statement on the DOS console

# # #01.14_java Language Basics (HelloWorld case FAQs) (master)
* A: Unable to find the file (show them all, let the students see what is wrong with them)
* A: File extension shadowing causes compilation to fail
* B: The file name is wrong
* B: Spelling problems (show them all, let the students see what is going on)
* A:class written as Class
* B:string written as String
* C:system Written system
* D:main written Mian
* C: Bracket matching problem (show the students to see what is the problem)
* A: Remove the curly braces from the class body
* B: Remove the curly brace of the method body
* C: Take out the curly brace of the output statement.
* D: Chinese and English issues (show me the students and see what's going On)
* A: Message: Error: illegal character: \???? The format
* Note: English characters are basically required in Java programming

# # #01.15_java Language Basics (Java language Writing format (conventional)) (master)
* 1, curly braces to align, and write in pairs
* 2, with a space in front of the left curly brace
* 3, encountered opening brace to indent, Tab
* 4, blank line between method and program block makes the program look clear
* 5, add spaces between statements, such as for statement
* 6, plus spaces on both sides of the operator

# # #01.16_java Language Base (Path environment variable function and configuration Method 1) (master)
* A: Issues that are prone to developing programs in the bin directory of the JDK
* A: If there are too many files, it is inconvenient to manage
* B: Delete the unwanted files that you have written, and may accidentally remove the tool from the JDK.
* B: How to solve the problem?
* Notepad Such commands can be executed under any path, configuring the PATH environment variable
* C: Configuration method
* A:XP System
* Right click on desktop computer → select Properties → select advanced tab → Click environment variables → find path→ in system variable double-click path→ to add the bin directory under the JDK installation directory to the leftmost and add a semicolon.
* B:WIN7/WIN8 System
* Right click on desktop computer → select Properties → select advanced system settings → select advanced tab → Click environment variables → find path→ under System variables double-click path→ to add the bin directory under the JDK installation directory to the leftmost and add a semicolon.
* C:WIN10 System
* Right click on desktop computer → select Properties → select advanced system settings → select advanced tab → Click environment variables → find path→ under System variables double-click path→ to add the bin directory under the JDK installation directory to the bottom without the semicolon.
* path is configured with executable file. exe, which can be configured to access executable files under Path paths under different drive characters

# # #01.17_java Language Foundation (PATH environment variable configuration 2) (master)
* A: Configure Java_home First
* B: Modify path again
* C: Finally, the path is a sequential relationship.

# # #01.18_java Language Basics (The role of CLASSPATH environment variables and their configuration) (learn)
* A: Why to configure Classpath
* Principle of B:classpath configuration
* C: How to configure Classpath

* The difference between path and classpath
* path is configured with executable file. exe, which can be configured to access executable files under Path paths under different drive characters
* CLASSPATH configuration Java class file, which is the. class file

# # #01.19_java Language Basics (editplus developer and compile run) (learn)
* A: Configure shortcut key compilation run
* B: Remove backup files

# # #01.20_java Language Basics (Overview of annotations and their classifications) (master)
* A: What is a comment
* B: Classification and explanation of notes
*//Two slash indicates a single line comment, and the contents of a line after the slash will not be run by the JVM compilation.
*/* Paragraph comment, the text between this symbol will not compile */
* Documentation comments are not spoken at the moment, said the following explanation

* The role of annotations
* A: Explanation procedure
* B: Help us Debug errors

# # #01.21_java Language Basics (Overview and use of keywords) (master)
* A: What is a keyword
* Words that are given a specific meaning by the Java language
* B: Features of keywords
* The letters that make up the keywords are all lowercase
* C: Common keywords
* public static void class, etc.
* D: Keyword considerations
* Goto and Const exist as reserved words, not currently used, advanced Notepad like EditPlus, with special color tag for keywords, very intuitive

# # #01.22_java Language Basics (Overview and composition Rules for Identifiers) (master)
* A: What is an identifier
* is a sequence of characters to use when naming classes, interfaces, methods, variables, etc.
* B: Constituent rules of identifiers
* English uppercase and lowercase letters
* Numeric characters
* $ and _
* C: identifier considerations
* 1, cannot use keyword
* 2, cannot start with a number

# # #01.23_java Language Foundation (common naming conventions in identifiers) (learn)
* See the meaning of the name
* A: Package
* Preferably the domain name upside down, requires all the letters lowercase
* B: Class or interface
* If the first letter of a word is capitalized
* If it is more than one word, capitalize each word first (hump mark)
* C: Method or Variable
* If it is a word all lowercase
* If multiple words, capitalize from the first letter of the second word
* D: constant
* If it is a word, all letters capitalized
* If there are multiple words, all the words are capitalized, each word is distinguished by an underscore

</div>

<div>

# # #02.01_java Language Basics (Overview and use of constants) (master)
* A: What is a constant
* Constants are identified with the final keyword, and their values cannot be changed during program execution.
* Classification of constants in B:java
* Literal Constants
* Custom Constants (Object-oriented section)
* C: Classification of literal constants
* Contents of string constants enclosed in double quotes
* Integer constant all integers
* Decimal constant all decimals
* Character constants are enclosed in single quotes, with only a single number, a single letter, or a single symbol
* Boolean constants are special, only true and false
* NULL constant NULL (part of the array explained)
SYSTEM.OUT.PRINTLN ("abc");//String constant
SYSTEM.OUT.PRINTLN (123);//integer constant
System.out.println (12.3);//Decimal constant
System.out.println (' 10 ');//' must be placed in a single character, 10 for 1 characters and 0 characters
System.out.println (');//' It is not possible to put anything in it, because it cannot represent any character
System.out.println (");//with table space characters
System.out.println (true);//boolean class has only two values, true and False
System.out.println (FALSE);

* D: Case Demo
* Output various constants with output statements. NULL does not show

# # #02.02_java Language Basics (Introduction overview and two, eight, hex plots) (learn)
* A: What is a binary
* Binary: is a carry system, is a kind of carry-out method stipulated by people. For any kind of binary--x, it means that the number operation at a certain position is every x in a bit. Binary is every two in one, eight into the system is every eight into a, decimal is every ten into one, Hex is 16 into one.
* For example, there are seven days in a week, seven, 12 months a year, 12 binary
* B: The origin of the decimal
* The origin of the decimal is because humans have 10 fingers
* C: The origin of the binary
* In fact, binary source and China, please read the historical records
* 18th century German mathematical philosophy master Leibniz from his missionary friend Bowett sent to his Latin translation "I Ching", read the composition of the gossip, surprised to find its basic prime number (0) (1), that is, the "I Ching" Yin Yao yao--and __ Yang Yao, the binary system is binary, And think this is the most advanced mathematics in the world. The invention and application of the computer, which was known as one of the important symbols of the third scientific revolution in the 20th century, is binary in its operation mode. It not only proves that the principle of Leibniz is correct, but also proves that the "I Ching" mathematical science is very remarkable.
* D: The origin of the eight-step system
* Any data that exists in the computer is in binary form. The early binary evolution of the electrical signal switch. An integer is also binary in memory, but using a large number of 1 or 0 values is cumbersome.
* So I want to shorten a lot of points, the three bits in the binary are represented by one. The maximum value that these three bits can fetch is 7. More than 7 are rounded up, which is the octal.
* E: The origin of hexadecimal
* But for the long binary into octal or longer, so the appearance of 4 bits to represent a situation, four bits maximum is 15, this is hexadecimal.
* F: Form characteristics of the same data in different binary representations
* The larger the system, the shorter the representation

# # #02.03_java Language Basics (presentation of different data) (mastering)
* A: Binary Data representation
* Made up of 0, 1. Start with 0b (b can be uppercase or lowercase) (JDK1.7 version can indicate binary)
* B: Data representation of octal
* by 0,1,... 7 composition. Start with 0
* C: Data representation in decimal
* by 0,1,... 9 composition. Integers are decimal by default
* D: Data representation in hexadecimal
* by 0,1,... 9,a,b,c,d,e,f (both uppercase and lowercase). Start with 0x
* E: Case Demo
* Output different binary performance 100 data.
* 0b100
* 0100
* 100
* 0x100

# # #02.04_java Language Basics (conversion plots of any decimal to a metric) (learn)
* A: The conversion principle of any binary to decimal
* Coefficient: Is the data on each one.
* Cardinality: X-Binary, base is x.
* Right: On the right, numbering starts from 0, and the number on the corresponding bit is the right of that bit.
* Result: the power of the coefficient * radix is added.
* B: Drawing Exercises
* Binary--Decimal
* Octal--Decimal
* Hexadecimal--decimal

# # #02.05_java language Base (decimal to arbitrary conversion plot) (learn)
* A: The conversion principle of decimal to arbitrary binary
* In addition to the accumulation of residual
* B: Drawing Exercises
* Decimal--Binary
* Decimal--eight binary
* decimal--16 binary

# # #02.06_java Language Basics (Fast conversion method) (Learn)
* a:8421 Code and features
* 8421 yards is the Chinese mainland, 8421 yards is the most commonly used in BCD code. In this encoding method each digit two value code 1 is represents a fixed value, each bit of 1 represents the decimal number to add up, obtains the result is it represents the decimal digit.
* B: Binary and decimal conversions by 8421 yards
* C: A simple way to binary to octal
* D: A simple way to binary to 16

# # #02.07_java Language Basics (original code anti-code complement) (learn)
* A: Why to learn the original code anti-code complement?
* Later to learn forced type conversion, if you do not know the original anti-complement will not understand the results
* Operations are performed in the order of complement.
* B: Several ways of symbolic data representation
* Original Code
* is the binary fixed-point notation, that is, the highest bit is the sign bit, "0" means positive, "1" is negative, and the remaining bits represent the size of the value.
* Through a byte, that is, 8 bits means +7 and-7
* 0 (sign bit) 0000111
* 1 (sign bit) 0000111
* Anti-code
* The inverse of a positive number is the same as its original code; the inverse of a negative number is a bitwise negation of its original code, except for the sign bit.
* Complement
* The complement of a positive number is the same as its original code; the complement of negative numbers is the minus 1 in its inverse code.

# # #02.08_java Language Basics (native code anti-code exercises) (Learn)
* A: Known source code for complement
* 0b10110100
* B: Known complement to seek the original code
* 0b11101110

# # #02.09_java Language Basics (Overview and format of variables) (master)
* A: What is a variable
* In the course of program execution, the amount of its value can change within a certain range
* B: Define the format of the variable
* Data type variable name = variable value;
* C: Why define Variables
* Used for constant storage of the same type of constant and can be reused

# # #02.10_java Language Basics (Overview and classification of data types) (master)
* A: Why is there a data type
* The Java language is a strongly typed language that defines specific data types for each data and allocates different sizes of memory space in memory
* Classification of data types in B:java
* Basic Data type
* Reference Data type
* Object-oriented section explained
* C: Basic data Type Classification (4 classes 8 kinds)
* Integer type
* Byte takes one byte-128 to 127
* Short accounts for two characters -2^15~2^15-1
* int accounted for four bytes -2^31~2^31-1
* Long takes eight bytes -2^63~2^63-1
* Floating point type
* Float accounts for four bytes -3.403e38~3.403e38 single precision
* Double for eight bytes -1.798e308~1.798e308 double precision
* Character type
* Char accounts for two bytes 0~65535 No negative numbers represent characters
* Boolean type
* Boolean
* Boolean theoretically accounts for one-eighth bytes, because a switch can be determined to be true and false, but the Boolean type in Java does not explicitly specify his size

Integer type
Byte B = 10;//takes one byte, 128 to 127
Short S = 20;//of two bytes
int i = 30;//Four byte integer The default data type is int type
Long x = 8888888888l;//is eight bytes if the long type is followed by L, it is best to enlarge L, because small l is too much like a
System.out.println (b);
System.out.println (s);
System.out.println (i);
SYSTEM.OUT.PRINTLN (x);

System.out.println (12345 + 54321l);

Floating-point types
float F = 12.3f;//of four bytes
Double d = 33.4;//Eight bytes The default data type is the double,double type and can be identified with D or D, but generally does not add
System.out.println (f);
System.out.println (d);

Character type
char c = ' a ';//accounted for two bytes
System.out.println (c);

Boolean type
Boolean B1 = true;
Boolean b2 = false;
System.out.println (B1);
System.out.println (B2);

# # #02.11_java Language Basics (define variables for different data types) (master)
* A: Case Presentation
* Define variables of different base data types and output
* Note the float type when assigning values, long type

# # #02.12_java Language Basics (Considerations for using variables) (master)
* A: Case Presentation
* A: Scope issues
* The same zone cannot use the same variable name
* B: Initialization value problem
* Local variables must be assigned before they are used
* C: A statement can define several variables
* int a,b,c ...;

# # #02.13_java Language Basics (implicit conversion of data type conversions) (master)
* A: Case Presentation
* A:int + int
* B:byte + int
* Default conversion rules in B:java
* Data types with a small range of values are evaluated with large data types, and small data types are first promoted to large, and then
* C: Draw to explain byte+int type problems

# # #02.14_java Language Basics (conversions of data types) (mastering)
* A: Cast problem
* int A = ten;
* byte B = 20;
* B = a + B;
* B: Format of the cast
* b = (byte) (A + B);
* C: Considerations for Casting
* If the value of the assigned data type is exceeded, the result will be different from the result you expect

# # #02.15_java language basis (the difference between the variable addition and the constant addition of a question) (master)
* A: Case Presentation
* Interview question: see if there is a problem with the following procedure, if there is a problem, please indicate and explain the reason.
* Byte B1 = 3;
* Byte b2 = 4;
* Byte B3 = b1 + b2;
* answer this question in two ways.
* B1 and B2 are two variables, the values stored in the variables are variable, so the JVM is unable to determine the specific values in the program run
* Variables of type Byte are automatically promoted to int type when the operation is performed
* Byte B4 = 3 + 4;
* 3 and 4 are constants, Java has a constant optimization mechanism, that is, at compile time directly to the results of the 3 and 4 are assigned to B4.

# # #02.16_java Language Foundation (range of values for long and float who's big and small) (learn)
* When mixed operations are performed, the Byte,short,char does not convert from one to the other, and the type is automatically promoted to int, and the other types are mixed with small data types promoted to large
* Byte,short,char--INT--long--float--double

* Long:8 bytes
* Float:4 bytes
* IEEE754
* 4 bytes is 32 x bits
* 1 bits is the sign bit
* 8 digits refers to digits
* 00000000 11111111
* 0 to 255
* 1 to 254
*-126 to 127
* 23 digits is the trailing digit
* Minus 127 per digit

* A: Their underlying storage structure is different.
* The range of data represented by B:float is larger than the range of long
* Long:2^63-1
* float:3.4*10^38 > 2*10^38 > 2*8^38 = 2*2^3^38 = 2*2^114 > 2^63-1

# # #02.17_java Language Basics (character and string participation) (mastering)
* A: Case Presentation
* SYSTEM.OUT.PRINTLN (' a ');
* SYSTEM.OUT.PRINTLN (' a ' + 1);

* Know the value of ' a ' by looking at the result, which leads to the ASCII code table
* Overview of the B:ASCII code table
* Remember three values:
* ' 0 ' 48
* ' A ' 65
* ' A ' 97
* C: Case Demo
* SYSTEM.OUT.PRINTLN ("Hello" + ' a ' + 1);
* SYSTEM.OUT.PRINTLN (' A ' +1+ "Hello");
* d:+ is called a string connector in the presence of a string
* SYSTEM.OUT.PRINTLN ("5+5=" +5+5);
* SYSTEM.OUT.PRINTLN (5+5+ "=5+5");

# # #02.18_java Language Foundation (char data type) (master)
* A:char C = 97;0 to 65535
* Characters in B:java language char can store a Chinese character? Why?
Can Because the Java language uses Unicode encoding. Each character in the Unicode encoding occupies two bytes. Chinese is also accounted for two bytes
* Therefore, characters in Java can store a Chinese character
# # #02.19_java Language Basics (basic usage of arithmetic operators) (master)
* A: What is an operator
* is the symbol that operates on constants and variables.
* B: Classification of operators
* Arithmetic operator, assignment operator, comparison (relationship or condition) operator, logical operator, bitwise operator, trinocular (meta) operator
* C: What are the arithmetic operators
* +,-,*,/,%,++,--
* D: Precautions:
* The a:+ number has three functions in Java, representing a positive sign, adding arithmetic, and a string connector
* B: Integers can be divided only by integers. If you want a decimal, you must change the data to a floating-point number type
* c:/Gets the quotient of the division operation,% gets the remainder of the division operation
*% operator
* When the left absolute is less than the right absolute value, the result is left
* When the absolute value on the left is equal to the right or multiple of the right, the result is 0
* When the absolute value on the left is greater than the absolute right, the result is the remainder
* The symbol for the result of the% operator is only related to the left, not to the right
* Any positive integer%2 result not 0 or 1 can be used as a toggle condition

# # #02.20_java Language Basics (arithmetic operator + + and--usage) (master)
* Function of the a:++,--operator
* Self-plus (+ +) self-subtraction (-) operation
* + +: self-added. +1 of the original data
*--: self-reduction. 1 of the original data
* B: Case Demo
* A: Used alone:
* The effect is the same as the front and back of the operand. (This usage is more common to us)
* B: Participate in the operation using:
* Put in front of the operand, increment or decrement first, and then participate in the operation.
* After the operand, first participate in the operation, and then self-increment or decrement.

# # #02.21_java Language Basics (arithmetic operator + + and--exercises) (master)
* A: Case Presentation
* Please calculate the value of a,b,c separately.
*
int a = 10;
int B = 10;
int c = 10;

A = b++;
c =--a;
b = ++a;
A = c--;

* B: Case Demo
* Please calculate the value of x, Y, respectively.

int x = 4;
int y = (x + +) + (++x) + (X*10);
* C: Face question
* byte B = 10;
* b++;
* B = b + 1;
* Ask which sentence will be an error, why

# # #02.22_java Language Basics (Basic usage of assignment operators) (master)
* A: What are the assignment operators
* A: Basic assignment operator: =
* Assign the data on the right to the left.

* B: Extended assignment operator: +=,-=,*=,/=,%=
* + = Add the left and right side, then assign to the left.

# # #02.23_java Language Basics (Interview questions for assignment operators) (master)
* A: Case Presentation
* Interview question: see if there is a problem with the following procedure, if there is a problem, please indicate and explain the reason.
* Short s=1;s = s+1; Forced type conversion required
* Short s=1;s+=1;

# # #02.24_java Language Basics (Basic usage of relational operators and considerations) (Master)
* A: What are the relational operators (comparison operators, conditional operators)
* ==,!=,>,>=,<,<=
* Precautions:
* Whether your operation is simple or complex, the result is a Boolean type.

* "=" cannot be written as "=".

</div>

Javase Basics of the Java Learning Path 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.