This chapter focuses on the architecture of the Java architecture, including four aspects: Java programming language, bytecode, Java API and Java Virtual machine four
And a brief introduction of the above four parts, at the same time, some new features in Java are introduced, because I read this book Java8 has been published, so some of them said to be implemented in the subsequent version of the functionality has been implemented, such as lambda expression, functional programming, etc., Finally, the use and compilation of OPENJDK are introduced.
Here are some of the concepts you don't know before reading
Lambda expression
What is a λ-expression
The lambda expression is essentially an anonymous method. Let's take a look at the following example:
public int Add (int x, int y) {
return x + y;
}
This is what it looks like after turning into a lambda expression:
(int x, int y), x + y;
Parameter types can also be omitted, and the Java compiler is inferred from the context:
(x, y), x + y; Returns the sum of two numbers
Or
(x, y), {return x + y;}//indicates the return value explicitly
The lambda expression is visible in three parts: A parameter list, an arrow (-a), and an expression or a block of statements.
The lambda expression in the following example has no parameters and no return value (equivalent to a method that accepts 0 parameters and returns void, which is actually an implementation of the Run method in the runnable):
(), {System.out.println ("Hello lambda!");}
If there is only one parameter and can be inferred by Java, the parentheses of the argument list can also be omitted:
C--{return c.size ();}
Can only understand this here, and then read a little to make up a little
2.Osgi
the OSGi (Open Service Gateway Initiative) technology is designed for Dynamic model system for Java. The OSGi service platform provides services to Java, which makes Java a preferred environment for software integration and software development. Java provides portability for products that are supported on multiple platforms. OSGi technology provides standardized primitives that allow applications to be built using refined, reusable, and collaborative components . These components can be assembled into an application and deployment.
Still do not understand very much, see a few times in the future good
"Java Virtual machine explaining" Reading notes-chapter I Java architecture