Skip to content

Commit be1a9d8

Browse files
author
Mike J Hewitt
committed
some changes to make my reading easier
1 parent d9316e6 commit be1a9d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The formula is implemented as an anonymous object. The code is quite verbose: 6
8080

8181
## Lambda expressions
8282

83-
Let's start with a simple example of how to sort a list of strings in prior versions of Java:
83+
Let's start with a simple example of how to sort a list of strings in previous versions of Java:
8484

8585
```java
8686
List<String> names = Arrays.asList("peter", "anna", "mike", "xenia");
@@ -122,7 +122,7 @@ List now has a `sort` method. Also the java compiler is aware of the parameter t
122122

123123
How does lambda expressions fit into Java's type system? Each lambda corresponds to a given type, specified by an interface. A so called _functional interface_ must contain **exactly one abstract method** declaration. Each lambda expression of that type will be matched to this abstract method. Since default methods are not abstract you're free to add default methods to your functional interface.
124124

125-
We can use arbitrary interfaces as lambda expressions as long as the interface only contains one abstract method. To ensure that your interface meet the requirements, you should add the `@FunctionalInterface` annotation. The compiler is aware of this annotation and throws a compiler error as soon as you try to add a second abstract method declaration to the interface.
125+
We can use arbitrary interfaces as lambda expressions as long as the interface only contains one abstract method. To ensure that your interface meets the requirements, you should add the `@FunctionalInterface` annotation. The compiler is aware of this annotation and throws a compiler error as soon as you try to add a second abstract method declaration to the interface.
126126

127127
Example:
128128

0 commit comments

Comments
 (0)