7 ms·
In Java you can’t just create a type. You are creating a mini app. Classes in Java hold logic and internal mutating state. I don’t want to create this just bec
by ninetyninenine 2y ago
In Java you can’t just create a type. You are creating a mini app.
Classes in Java hold logic and internal mutating state. I don’t want to create this just because I need a type.
Really you want to create a struct or an interface as a type.
- morcus 2y agoLuckily Java now has "Record" to partially handle the pain.
- jonasenordin 2y agoJava has interface types. https://en.wikipedia.org/wiki/Interface_(Java) https://en.wikipedia.org/wiki/Interface_(Java)
- ninetyninenine 2y agoI know but the article talks about classes and almost equate the concept of a class with a type in the same way java does.