You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,16 @@ A container object which may or may not contain a non-null value. It contains se
112
112
113
113
Additional methods that depend on the presence or absence of a contained value are provided, such as _orElse()_ (return a default value if value not present) and _ifPresent()_ (execute a block of code if the value is present).
114
114
115
+
Optional is implemented in the _Optional_ class in the project. In the main method, the code
116
+
117
+
```java
118
+
119
+
finalOptional<Object> empty =Optional.empty();
120
+
121
+
```
122
+
123
+
means that Optional object is empty. Due to this, __isPresent()__ returns false whereas __isEmpty()__ returns true.
124
+
115
125
- Add a picture linking imperative and declarative approach together.
0 commit comments