Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. fun main(args: Array<String>) {
  2. val primary = Primary("Doe")
  3. val primaryCon = PrimaryConstructor("John")
  4. primary.testCall()
  5. primaryCon.testCall()
  6. }
  7.  
  8. class Primary constructor(val firstName: String) {
  9. fun testCall() {
  10. println("First Name : $firstName")
  11. }
  12. }
  13.  
  14. class PrimaryConstructor(val firstName: String) {
  15. fun testCall() {
  16. println("First Name : $firstName")
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement