Organized by learning JAVA knowledge points

Java can be understood as a programming language or development tool, and the ultimate purpose is to write programs that run directly on the machine, and develop the JVM (Java Virtual Machine).

       The Java source program is compiled into bytecode by the compiler, and the bytecode is interpreted and executed by the virtual machine. The virtual machine sends each bytecode to be executed to the interpreter, and the interpreter translates it into a machine on a specific machine. code and then run it on a specific machine.

JDK: Java Development Kit (Java Development Kit), is a set of development kits for users to Java programmers, which includes:
      1. JRE (Java Runtime Envoirment): Java runtime environment, the most important part of which is the JVM;
      2. Java development tools: compilation tool javac, API generation tool javadoc...;

      3. Core class library (Java API)

About the basic operation of
      the command prompt Open the command prompt: cmd
      Enter the corresponding drive letter: c: d: e: Enter
      all files in a directory: dir
      Enter a directory: cd Directory name (the part of the directory name wildcard use *)

      Return to the previous directory: cd..

Configuring the JDK:
      Prerequisite: A folder containing the full JDK files is required.
      1. JAVA_HOME = d:\xx\xx\jdk1.8
      2. Add the directory %JAVA_HOME%\bin to Path
      3. CLASSPATH = .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools. jar;

      This completes the deployment of the JDK.

Procedural programming and object
      -oriented programming Procedural programming: Do one thing through a function, and after this thing is completed, there will be no legacy. Or understand it as: one-time.
      Object-oriented programming: When completing a thing, the entity objects in the thing are abstracted to form the concept of "class". The completion of the thing is realized through the relationship between the objects of the class.

      Difference: In object-oriented programming, entity objects can be "reusable".

      A class is a feature master for a group of objects, and an object is an implementation of a class.
      Features (classes) include: basic attributes (attributes), behaviors (methods)

Notes:

Documentation comments:
      /**
       * Relevant comments, even HTML tags
       * 
       */

One-line comment:

      // single line comment

Multi-line comments:

      /*
       first line comment
       second line comment

      */

Java identifiers:

      It can only contain numbers, letters (upper and lower case, Unicode characters), underscore _, dollar sign $, and cannot start with a number.

Separator:
      curly braces {}: define a code block, which is logically a whole, including the body of the class, method body, static code block, conditional and execution body of the loop statement;
      semicolon;: the end of the statement, if it appears on a line There are several statements, so you need to use between them; separate;
      square brackets []: used in arrays;
      parentheses (): declare formal parameters in the method, and pass in the actual parameters when calling the method, Expression priority definition; mandatory type conversion;
      space: single space, Tab key, Enter key, the appearance of space will not affect the program running, but good indentation can improve the readability of the program;

      Dot. : Used to separate the class/object and its members, indicating that the property or method of the class/object is called.

type of data:

      1. Basic data types: a. Numerical type [integer type (byte, short, int, long); floating point type (float, double)]; b. Character type char; c. Boolean type boolean 

      2. Reference data type: a. class; b. interface; c. array

Regarding the development of Eclipse, it has been noted in another blog

Syntax of variable declaration:

      data type variable name;

Syntax for variable assignment:

      variablename = value;

      The two can be written together:

          datatype variable name = value;

The life cycle of the variable:

      The lifetime of a variable is within the scope defined by {}.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325641123&siteId=291194637