Say I have the following Trait
trait Feature{
val name:String
val tableName = s"${name}_table"
}
and a class that extends it
class Feature1 extends Feature{
val name = "feature1"
}
but when I initialize the class and print tableName I get "null_table" rather than "feature1_table". I am trying to fully understand why that is. Is it because since tableName is technically implemented within the Trait it takes the null value of name before it can get instantiated by the extending class?