``` class Foo { Foo(String unhashedPassword) { ...
# announcements
u
Copy code
class Foo {
   Foo(String unhashedPassword) {
       this.hashedPassword = HashUtils.sha1(unhashedPassword)
    }
}
c
Copy code
class Foo(unhashedPassword: String) {
	val hashedPassword = HashUtils.sha1(unhashedPassword)
}
u
okay so if no var/val then its just a ctor param, not a property, right?
thanks
c
Yep, and it can be used either like in my example or in
init {}
part of the primary constructor. Welcome.
👍 1