Skip to content

Instantly share code, notes, and snippets.

@5AbhishekSaxena
Last active June 5, 2023 08:56
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 5AbhishekSaxena/82c775eec018899715dd6dd7bca87c8b to your computer and use it in GitHub Desktop.
Save 5AbhishekSaxena/82c775eec018899715dd6dd7bca87c8b to your computer and use it in GitHub Desktop.
class User {
val firstName: String
val middleName: String? // optional
val lastName: String
val address: Address
val contact: Contact? // optional
val company: Company? // optional
val educations: List<Education>
constructor(
firstName: String,
middleName: String?,
lastName: String,
address: Address,
contact: Contact?,
company: Company?,
educations: List<Education>
) {
this.firstName = firstName
this.middleName = middleName
this.lastName = lastName
this.address = address
this.contact = contact
this.company = company
this.educations = educations
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment