Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5DfjBGLBr7F5km2AN
28 lines
726 B
Plaintext
28 lines
726 B
Plaintext
=== Q44 Lambdas and functional interfaces ===
|
|
180.0 true 6 hello 5
|
|
=== Q45 Streams: map, filter, collect, laziness ===
|
|
[ASHA, ARJUN]
|
|
{4=2, 5=2}
|
|
nothing visited yet: no terminal operation
|
|
visited asha
|
|
first = asha
|
|
reuse -> stream has already been operated upon or closed
|
|
=== Q46 Optional ===
|
|
expensive() called
|
|
orElse : value
|
|
orElseGet : value
|
|
nothing here
|
|
=== Q47 Records ===
|
|
Point[x=1, y=2] equals Point[x=1, y=2]: true, x() = 1
|
|
rejected: negative coordinate
|
|
=== Q48 var, switch expressions and text blocks ===
|
|
{"name": "asha",
|
|
"grade": "A"}
|
|
=== Q49 Method references and default methods ===
|
|
abc
|
|
walk and swim
|
|
=== Q50 Threads: start() vs run(), and virtual threads ===
|
|
running on: main
|
|
running on: worker-1
|
|
virtual: true
|