Hey, I did a thing, you might like it! Java JSpecify Exercise

Learning by doing is the most durable kind of learning.

I’ve put together a small repo with ~20 classes, organised into easy, medium, and hard levels to introduce you to JSpecify.

So after reading the JSpecify docs, try to annotate giv…


This content originally appeared on DEV Community and was authored by Ivan Juren

Learning by doing is the most durable kind of learning.

I’ve put together a small repo with ~20 classes, organised into easy, medium, and hard levels to introduce you to JSpecify.

So after reading the JSpecify docs, try to annotate given classes, specify the nulls, and get some real hands-on JSpecify experience.

I believe it’s really important to understand the “type” semantics shift — what @Nullable actually means. The generics really piqued my interest.

If you want a sneak peek at the kind of reasoning you’ll be doing, check out my other short read where I question one of my favourite patterns for dealing with nulls: Rethinking Optional<?>

Going from this:
Optionals way of handling nullability

To this:
JSpecify way of handling nullability

More concise and safer.

🔗 Repo: github.com/ivan-juren/jspecify-exercise

Can you see yourself using JSpecify in your projects?

Would love to hear what you think 👇


This content originally appeared on DEV Community and was authored by Ivan Juren


Print Share Comment Cite Upload Translate Updates
APA

Ivan Juren | Sciencx (2025-10-23T08:35:29+00:00) Hey, I did a thing, you might like it! Java JSpecify Exercise. Retrieved from https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/

MLA
" » Hey, I did a thing, you might like it! Java JSpecify Exercise." Ivan Juren | Sciencx - Thursday October 23, 2025, https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/
HARVARD
Ivan Juren | Sciencx Thursday October 23, 2025 » Hey, I did a thing, you might like it! Java JSpecify Exercise., viewed ,<https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/>
VANCOUVER
Ivan Juren | Sciencx - » Hey, I did a thing, you might like it! Java JSpecify Exercise. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/
CHICAGO
" » Hey, I did a thing, you might like it! Java JSpecify Exercise." Ivan Juren | Sciencx - Accessed . https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/
IEEE
" » Hey, I did a thing, you might like it! Java JSpecify Exercise." Ivan Juren | Sciencx [Online]. Available: https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/. [Accessed: ]
rf:citation
» Hey, I did a thing, you might like it! Java JSpecify Exercise | Ivan Juren | Sciencx | https://www.scien.cx/2025/10/23/hey-i-did-a-thing-you-might-like-it-java-jspecify-exercise/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.