Found it - <https://antonioleiva.com/sealed-classe...
# getting-started
a
h
It’s starts by saying that there are no sealed classes in java, but http://www.drmaciver.com/2007/09/how-to-create-sealed-classes-in-java/ seems to suggest otherwise. Where’s the catch?
a
I could look further, but just looking at this code sample, Antonio could be correct - While you can simulate a sealed class in Java, it doesn't look like it's caked into the language.
@antonioleiva is in this slack, perhaps he can answer.
a
yeah, Java doesn’t have the concept of “sealed class” meaning that the compiler can’t detect for you that you’re missing a check in a “switch” for example
👍 1
at least from what I know from Java (the Java that can be used in Android)
h
Thanks for the article and the clarification.
😉 1