This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User(var name:String?, var login:String?, var password:String?, var phoneNumber:String?){ | |
| var contacts = arrayOfNulls<String>(100) | |
| var posts = arrayOfNulls<String>(100) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open class Person(var name:String, var age:Int, var gender:Boolean){ | |
| init { | |
| if(gender){ | |
| if (age>26){ | |
| age-=5 | |
| } | |
| } | |
| } | |
| fun showAge():Int{ | |
| return age |