diff --git a/_th/tour/traits.md b/_th/tour/traits.md index bb6dfddd9c..eb8176435f 100644 --- a/_th/tour/traits.md +++ b/_th/tour/traits.md @@ -44,7 +44,7 @@ trait Iterator[A] { {% tab 'Scala 3' for=trait-iterator-definition %} -```scala +```scala 3 trait Iterator[A]: def hasNext: Boolean def next(): A @@ -92,7 +92,7 @@ iterator.next() // returns 1 {% tab 'Scala 3' for=trait-intiterator-definition %} -```scala +```scala 3 trait Iterator[A]: def hasNext: Boolean def next(): A @@ -179,7 +179,7 @@ animals.foreach(pet => println(pet.name)) // แสดงค่า Harry Sally {% tab 'Scala 3' for=trait-pet-example %} -```scala +```scala 3 import scala.collection.mutable.ArrayBuffer trait Pet: