Sunit Ghosh

@engineersunit
3 Followers
0 Following
12 Posts
16 years of Enterprise Cloud Native & Distributed Software Development experience using Java, J2EE, Microservices, Oracle SQL and NoSQL Databases and Oracle
Xhttps://twitter.com/engineersunit
LinkedInhttps://www.linkedin.com/in/sunitghosh/
GitHubhttps://github.com/engineersunit
YouTubehttps://www.youtube.com/@engineersunit
Sunit Ghosh on LinkedIn: #macbook #macbookpro #sonoma #openjdk #oracle #java #jdk #apple

I was just going to upgrade my MacBook Pro M3 Sonoma from version 14.3 to 14.4 and then this happened .... . . . . . . . . . . "Java users on macOS 14…

I was just going to upgrade my MacBook Pro M3 Sonoma from version 14.3 to 14.4 and then this happened ....

"Java users on macOS 14 running on Apple silicon systems should consider delaying the macOS 14.4 update"
https://blogs.oracle.com/java/post/java-on-macos-14-4

Java 22 coming to your computes this week on 19th March! Sharing favorite features cheat sheet with you!
#JDK22 #Java22 #OpenJDK
Compute Natural Language Processing NLP Stat - Chrome Extension - Java 21 Virtual Thread - Wikipedia

YouTube

How to make a #ChromeBrowser extension to run code from a #Java21 #VirtualThread based HTTP server to compute #NaturalLanguageProcessing (#NLP) statistics from the opened #wikipedia pages and display them inline in the page?

https://www.linkedin.com/posts/sunitghosh_java21-javavirtualthreads-googlechrome-activity-7165610916032577536-6hUt

Sunit Ghosh on LinkedIn: #java21 #javavirtualthreads #googlechrome #chrome #browserextension #nlp…

How to make a Chrome browser extension to run code from a Java 21 Virtual Thread based HTTP server to compute Natural Language Processing (NLP) statistics from…

Behavioral Parameters

Behavior parameterization is the ability of a method to receive multiple different behavior as its parameter and use them internally to accomplish the task

Java Streams - Side Effects?

A side effect is an action taken from a stream operation which changes a state externally

Come to the playground
https://dev.java/playground/
The Java Playground - Dev.java

Dev.java: The Destination for Java Developers

Hint 💡

https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/stream/IntStream.html#count()

''''
An implementation may choose to not execute the stream pipeline (either sequentially or in parallel) if it is capable of computing the count directly from the stream source. In such cases no source elements will be traversed and no intermediate operations will be evaluated. Behavioral parameters with side-effects, which are strongly discouraged except for harmless cases such as debugging, may be affected.
''''

IntStream (Java SE 21 & JDK 21)

declaration: module: java.base, package: java.util.stream, interface: IntStream

Java Streams: Behavioral Parameters with Side-Effects

Will the peek operation print the Fibonacci sequence till 5?

"""
Stream.of(1, 1, 2, 3, 5)
.peek(System.out::println)
.count()
"""

Hints 💡 and learnings in the comments!

Use Java Playground to try out the code

#Java #JavaStreams

Yes
25%
No
75%
Poll ended at .
Effect cases in switch