Skip to content

Instantly share code, notes, and snippets.

@yareally
Last active December 18, 2015 16:29
Show Gist options
  • Save yareally/5811498 to your computer and use it in GitHub Desktop.
Save yareally/5811498 to your computer and use it in GitHub Desktop.
class MyClass (val id: Int, val name: String) {}
class MyClass () {
var id: Int = 0
var name: String = ""
def MyClass(id: Int, name: String) {
this.name = name
this.id = id
}
}
class MyClass(id: Int, name: String) {
def getString() = name + ":" + id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment