Skip to content

Commit 4e8e629

Browse files
committed
doc changes
1 parent 0a3e41f commit 4e8e629

File tree

1 file changed

+7
-1
lines changed
  • manifold-deps-parent/manifold-params

1 file changed

+7
-1
lines changed

manifold-deps-parent/manifold-params/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ valueOf(array, count:20) // use default for offset by naming count
2121

2222
This plugin supports JDK versions 8 - 21 (and the latest) and integrates seamlessly with **IntelliJ IDEA** and **Android Studio**.
2323

24+
### Key Features
25+
- **Optional Parameters**: Define default values for method parameters
26+
- **Named Arguments**: Pass arguments by name, not just by position
27+
- **Binary Compatible**: Works seamlessly with legacy code
2428

2529
# Contents
2630

@@ -100,7 +104,7 @@ record Pizza(Size size,
100104
In this case, named arguments make it clear which values are being assigned to which parameters, improving the overall
101105
readability of the code.
102106

103-
You can also mix positional and named arguments, but named arguments must come after positional arguments.
107+
You can also reorder named arguments and mix positional and named arguments, but named arguments must come after positional arguments.
104108
```java
105109
new Pizza(Large, cheese:Fresco, sauce:Chili);
106110
```
@@ -196,12 +200,14 @@ cautiously to prevent unintended side effects.
196200
Optional parameters and named arguments are fully accessible from compiled .class files, just like source code.
197201
```java
198202
// .class file
203+
199204
public class MyClass {
200205
public void size(int width, int height = width) {...}
201206
}
202207
```
203208
```java
204209
// .java file
210+
205211
MyClass myClass = new MyClass();
206212
myClass.size(width:100);
207213
```

0 commit comments

Comments
 (0)