java study notes, I learned a super detailed notes java Pa friend!

java study notes
this is one of my school friends tyrants learn little by little accumulated when java notes, for everyone to share, I hope to help just learning java, or think you learn the java. What is not online copy and paste down, very basic content is very important points!
First, the basics:
1, the difference between JVM, JRE and JDK are:
the JVM (the Java Virtual Machine): java virtual machine for java properties to ensure cross-platform.
java language is cross-platform, jvm is not cross-platform.
JRE (Java Runtime Environment): java runtime environment includes jvm + java core class libraries.
JDK (Java Development Kit): java development tools, development tools including jre +

2. What is the role of the environment variable and classpath is the path?
(1) path is to configure the search path for Windows executable file that extension directory with an .exe program file is located,
used to specify the path to the DOS command window.
(2) Classpath is the directory class configuration file is located, used to specify the class search path, JVM is through it to find the class file class of the class.

3, variable what's the use? Why should we define the variables? When to use?
A: The role of variables: to store data.
Why should the definition of variables: to continue to store the same type of constant, and can be reused

? 4, and the difference between the && &
A: (1) && short circuit occurs, if it is determined that the result can be an expression of the entire expression by the second arithmetic expression behind not continue;
operate only boolean data type;
(2) & will not short-circuit, the entire expression operation. Either boolean operation data may further operands.

5, identifier naming rule:
a (0-9), case letters, and $ _ and composition.
You can not start with a number.
You can not use the keyword from the definition of a name.

6, data types:
(1) basic data types (eight kinds of class 4):
integer types: byte, short, int, long
floating point numbers: float, double
character type: char
boolean: Boolean (ture to false)
(2) reference data types:
class
interfaces
array

7, the type of conversion
accuracy Low int Short Long a float Double (char) byte
(. 1) automatic conversion to a low accuracy ---  precision
(2) to cast a high-precision low accuracy ---  (reduced accuracy)

8 three technical architecture java language
J2EE: Enterprise Edition
for developing applications in enterprise environments to provide a set of solutions.
Technologies such as Servlet, Jsp, etc. contained in the technical system, aimed at Web application development.
J2SE: Standard Edition
is the solution for the desktop and the development of common business applications to offer.
The technology system is the basis for the other two, you can complete some developing desktop applications.
Such as the Java version of Minesweeper.
J2ME: Small version
is the solution for the development of consumer electronics and embedded devices provide.
The technology system is mainly used in small electronic consumer products, such as applications and other phone.

9, the cross-platform java:
written in the Java language applications can run on different platforms.
The reason cross-platform:
as long as the operating system needs to run java applications, install a Java Virtual Machine (JVM Java Virtual Machine) can be.
By the JVM is responsible for running Java programs in the system.

10, there is a representation of symbol data (second priority)
of the original code, the inverted (negated original code), the complement (inverted +1).

11, the function
definitions: definition of the function is a separate piece applet having a specific function in the class.
Features:
defined functions can be encapsulated function code
to facilitate this function multiplexing
function will be executed only is called
in function improves the reusability of code
for the particular case where the function does not return value, the return value type using the keyword void representation,
then the function return statement can be omitted if the last line.
Application of two distinct functions:
what the final result will be a clear definition is?
In the process of defining clearly the function, the need for participation of unknown content operation

12, Overload:
Concept: In the same class, to allow more than one function of the same name, as long as they have different number of parameters or parameter types can.
Features: non-return type, look at the list of parameters (parameter type and number of parameters).
Benefits: Easy to read, optimized programming.

13, the array:
Concept: A data set of the same type.
Benefits: automatically to elements in the array are numbered from 0 to facilitate the operation of these elements.

14, memory structure:
stack memory: to store local variables, when data has been used, the space occupied by automatically released.
Heap memory: arrays and objects, through a new instance of the establishment are stored in the heap memory.
Method Area: static member, constructors, constant pool, thread pool
native method area: window system takes the
register: some small storage area for storage of data for temporarily storing data and calculation results involved in computing.

Limited space is divided into several fat, like this article, you can follow me, I will continue to update, update your concerns are my motivation! For more java learning materials may also private letter I!
I wish my people are concerned about: good health, plenty of money, welfare, such as the East China Sea, many happy returns, Taoyuan County, from not afford to send!

Guess you like

Origin blog.51cto.com/14623707/2467105