@@ -258,18 +258,18 @@ level: 2
258
258
var memeOfTheDay = "";
259
259
switch (day) {
260
260
case WEDNESDAY:
261
- mOTD = "ITS WEDNESDAY MY DUDES";
261
+ memeOfTheDay = "ITS WEDNESDAY MY DUDES";
262
262
break;
263
263
case FRIDAY:
264
- mOTD = "IT'S FRIDAY, FRIDAY!";
264
+ memeOfTheDay = "IT'S FRIDAY, FRIDAY!";
265
265
break;
266
266
default:
267
- mOTD = "None found."
267
+ memeOfTheDay = "None found."
268
268
}
269
269
```
270
270
271
271
```java
272
- var mOTD = switch (day) {
272
+ var memeOfTheDay = switch (day) {
273
273
case WEDNESDAY -> "ITS WEDNESDAY MY DUDES";
274
274
case FRIDAY -> "IT'S FRIDAY, FRIDAY!";
275
275
default -> "None found."
@@ -336,7 +336,7 @@ record PokeDexEntry(int dexNo, String name) {}
336
336
```
337
337
338
338
```java
339
- class PokeDexEntry {
339
+ final class PokeDexEntry {
340
340
private final int dexNo;
341
341
private final String name;
342
342
@@ -1152,3 +1152,42 @@ hideInToc: true
1152
1152
<div class =" flex justify-center " >
1153
1153
<img class =" h-48 " src =" /images/qr-code_slides_400_400.png " />
1154
1154
</div >
1155
+
1156
+ ---
1157
+ layout: default
1158
+ hideInToc: true
1159
+ ---
1160
+
1161
+ <Titles >
1162
+ <div class =" flex w-full flex-row justify-between items-center " >
1163
+ <div class="bg-orange-500 shadow h-10 w-10 text-center justify-center items-center flex mb-4"><h4 class="text-white">??</h4></div>
1164
+ <h1 class="flex align-center justify-center items-center">Derived Record Creation JEP 468
1165
+ </h1 >
1166
+ <div class="bg-green-500 shadow h-10 w-10 text-center justify-center items-center flex mb-4"><h4 class="text-white">??</h4></div>
1167
+ </div >
1168
+ </Titles >
1169
+
1170
+
1171
+ ```` md magic-move
1172
+
1173
+ ```java
1174
+ Point newLoc = new Point(oldLoc.x() * 2, oldLoc.y(), oldLoc.z());
1175
+
1176
+ or
1177
+
1178
+ record Point(int x, int y, int z) {
1179
+ Point withX(int newX) { return new Point(newX, y, z); }
1180
+ Point withY(int newY) { return new Point(x, newY, z); }
1181
+ Point withZ(int newZ) { return new Point(x, y, newZ); }
1182
+ }
1183
+
1184
+ ```
1185
+
1186
+ ```java
1187
+ Point nextLoc = oldLoc with {
1188
+ x *= 2;
1189
+ y *= 2;
1190
+ z *= 2;
1191
+ };
1192
+ ```
1193
+ ````
0 commit comments