Join Slack
Powered by
how do I make a constructor for a class that may t...
# getting-started
h
Hullaballoonatic
09/24/2018, 8:04 PM
how do I make a constructor for a class that may throw an exception and thus does not instantiate?
s
Sam
09/24/2018, 8:07 PM
Copy code
class Team( val size : Int ) { init { require( size > 3 ) } }
😍 1
h
Hullaballoonatic
09/24/2018, 8:07 PM
thank you!
3
Views
Open in Slack
Previous
Next