Skip to content

Instantly share code, notes, and snippets.

@kyawhtut-cu
Created November 18, 2019 07:11
Show Gist options
  • Save kyawhtut-cu/58f59e795c2be888112776a9b187644f to your computer and use it in GitHub Desktop.
Save kyawhtut-cu/58f59e795c2be888112776a9b187644f to your computer and use it in GitHub Desktop.
data class User @JvmOverloads constructor(
var name: String,
var age: Int,
var address: String = "",
var gender: String
) {
companion object {
val TAG = User::class.java.name
fun createUser(name: String, age: Int, address: String = "", gender: String): User {
return User(name, age, address, gender)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment