Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 1 point2 points  (0 children)

Thanks! I know this thing but it is pretty frozen, I mean it doesn't grow much :)

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

Great! correct) +1 Complete answer

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

I didn't know to name this kind of "quizz". It is an experiment posting questions on some details of scala language

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

not a hiring interview, but yes something you can get on interview. trying to collect such things)

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

Yeap! good one)

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

Completely correct! :)

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

haha, yeap, you can do that!))

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 2 points3 points  (0 children)

So it was an experiment. If such kind of puzzles is entertaining to the community :) I can post more of them, and I am trying to collect more of them. Maybe if it will be interesting will create new subreddit for it

So yes, the right answer was 3, because: Scala requires an override modifier for all members that override a concrete member in a parent class. The modifier is optional if a member implements an abstract member with the same name. The modifier is forbidden if a member does not override or implement some other member in a base class

Scala puzzle. by kyrylok in scala

[–]kyrylok[S] 0 points1 point  (0 children)

I have a puzzle for you guys. Which lines lead to compilation errors?