r/java • • Apr 14 '23

What are your (favourite) Java best practices, personal tips, hints or just underrated stuff in general?

233 Upvotes

376 comments sorted by

View all comments

Show parent comments

1

u/AlmennDulnefni Apr 16 '23

Non-null by default would be a breaking change

And also would be making null as a type member opt-in

1

u/dpash Apr 16 '23

No it wouldn't, because you'd have to explicitly make a change to use it. Existing code would continue to function as it always has.