Skip to content

Instantly share code, notes, and snippets.

@Sottti
Last active December 15, 2018 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sottti/3b313ce6f592183717207d4bbef549e7 to your computer and use it in GitHub Desktop.
Save Sottti/3b313ce6f592183717207d4bbef549e7 to your computer and use it in GitHub Desktop.
// User is public
// The User primary constructor is private
class User private constructor(id : Int) {
// ...
}
// Moderator is internal
// The Moderator primary constructor is private
internal Moderator private constructor(id : Int) {
// ...
}
// Staff is internal
// The Staff primary constructor is public, but it's
// visibility is restricted by the class internal modifier
internal Staff(id : Int) {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment