Skip to content

Instantly share code, notes, and snippets.

@kyawhtut-cu
Created November 18, 2019 07:16
Show Gist options
  • Save kyawhtut-cu/38df7354848f6f62767aa28973ab0653 to your computer and use it in GitHub Desktop.
Save kyawhtut-cu/38df7354848f6f62767aa28973ab0653 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 {
@JvmStatic
val TAG = User::class.java.name
@JvmStatic
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