First, the basic concept
- Java LAMBDA expressions are a new feature introduced in Java 8, and the main purpose is to provide a functional syntax to simplify coding.
- A lambda expression is essentially an anonymous method.
- Java LAMBDA Expressions use the functional interface as the base of the application.
- An inner class (inner class) is a class that is defined inside another class.
Ii. Points of attention
- There are three reasons for using internal classes:
- An inner class method can access the data in the scope where the class definition resides, including private data.
- Inner classes can be hidden and not seen by other classes in the same package.
- Using anonymous inner classes is convenient when you want to define a callback function and do not want to write a lot of code.
- An inner class object holds a reference to an external class object that, when a variable is accessed in the member method of the inner class, is not defined in the method and inner class, and the reference to the variable in the inner class is passed to the reference of the outer object.
Third, object-oriented program design course study progress bar
Week |
(read/write) Number of lines in code |
Post Blog volume/comment blog number |
classroom/After School time (hours) |
Most satisfying programming task |
first week |
20/7 |
1/1 |
6/4 |
write Hello World program |
second week |
38/20 |
1/1 |
6/5 |
Experiment two tasks three |
third week |
50/30 |
1/1 |
6/7 |
experiment three |
Fourth week |
58/46 |
1/1 |
6/5 |
Edit Write output n digits number, and sum |
Fifth week |
67/53 |
1/1 |
6/6 |
class definition and overloading |
Sixth week |
71/60 |
1/1 |
6/4 |
interface |
Eighth Week |
80/66 |
1/ |
6/3 |
lamdba expression |
... |
|
|
|
|
Cumulative |
384/275 |
7/6 |
42/34 |
|
201671010128 2017-10-08 "Java programming" lambda and inner class