kotlin - How to declare several properties on one line -


i'm developing class several lateinit properties of 1 type. think it's verbose declare each of them on separate line this:

lateinit var a: string  lateinit var b: string 

so declare them on 1 line this:

lateinit var b, c: string // error: property getter or setter expected 

but error property getter or setter expected. there way declare several properties on 1 line in kotlin?

no, there no way that. declaring multiple properties on same line frowned upon many java style guides, did not implement support in kotlin.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -