i have a question about scala and logic in constructor. Lets say i have a following code:
class A(val x:Int) {...whatever...}
class B(val y:String) extends A(IntValueDerivedFrom_y)
Now, how would i derive some value from y and passed it to constructor of class A? I hope it’s understandable what i ask about.
Thanks for the answers!
Not sure I understand.
You may do
f(y)stands for any expression whereyappears. For instance,Integer.parseInt(y)This is close to java code
Is that what you wanted?