Baeldung/scala-tutorials

Wrong Example in

vasiliy-bout opened this issue · 1 comments

Website contains the following snippet:

val i10 = 127 // Integer 127 
val i11 = 128 // Integer 128 
i11.isValidByte should be (true) 
i10.isValidByte should be (false) 

It seems that assertions for i10 and i11 are swapped around.

The sources however contain the correct version:

val i10 = 127 // Integer 127
val i11 = 128 // Integer 128
i11.isValidByte should be(false)
i10.isValidByte should be(true)

Hi @vasiliy-bout ,
Thanks for catching that! We fixed the article.