Review knowledge point 1: Consolidation is the most effective and fastest way to improve knowledge Come on

Table of contents

consolidate

What is the JDK? What is it composed of?

keywords

Literal

Special characters

variable

 Note on variables

data storage in computer

Any base to decimal

 Binary to DecimalEdit

 Octal to DecimalEdit

  Decimal to DecimalEdit

 Decimal to other base

​Edit ASCII code table


Let's start to study and consolidate now. I just started learning Java last year, but I stopped learning halfway. This is a very irresponsible approach, not only irresponsible to oneself, but also irresponsible to the entire college career! Let us supervise and study together, even if it is a salted fish, we must be the saltiest fish, so that everyone dare not try it!

consolidate

Java does not run directly in the system, but in a virtual machine;

javac compilation tool

java runtime tool

jdb debugging tool

jhat memory analysis tool


Programming: Java programmers write .java code, C language writes C code, and Python programmers write .py code.

Compilation: The machine only understands the machine language of 0011, and the process of converting the code of .java.c.py for the machine to understand.

Run: Let the machine execute the compiled instructions.


What is the JDK? What is it composed of?

JDK is the Java Development Kit

JVM virtual machine: where Java programs run

Core class library: Java has written something, we can use it directly~

Development tools: javac java jdb jhat etc.

What is JRE?

JRE is the Java runtime environment

JVM core class library running tools

The inclusion relationship among JDK, JRK, and JVM?

JDK includes JRE

And the JRE contains the JVM


keywords

Keywords are English words that are endowed with specific meanings by Java.

Keywords are all lowercase

class : used to create or define a class; a class is the most basic unit; the class keyword indicates a class, followed by the class name.


Literal

Integer type: number without decimal point

DecimalType: Number with decimal point

String type: content enclosed in double quotes

Character type: Enclosed in single quotes, there can only be one

Boolean type: Boolean value, only two values, true and false, indicating true and false

empty type: null

    The empty type cannot be printed directly. If it must be printed, it can only be printed in the form of a string, such as

System.out.println("null"); 

The literal value is to tell the programmer that the data is written in the program! 


Special characters

\t Tab character (used most when printing tabular form)

When printing, make up the length of the previous string to 8, or an integer multiple of 8, at least one space and at most 8 spaces.


variable

The following is the basic usage of variables:

  • Define variables and output
  • Variables participate in the calculation
  • Modify the value of a variable record

 Note on variables

only one value can be stored

Variable names are not allowed to be defined repeatedly

One statement can define multiple variables

Variables must be assigned a value before being used

When defining a variable, the assignment cannot be written separately

variable scope

 Variable summary:

Exercise: watch the following video


data storage in computer

Computer storage rules: In a computer, any data is stored in binary. 


Any base to decimal

 binary to decimal

 Octal to Decimal

  Decimal to Decimal

 

 Decimal to other base

 

 ASCII code table


 

Guess you like

Origin blog.csdn.net/m0_57448314/article/details/129140565