We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cec499 commit 0c6691bCopy full SHA for 0c6691b
src/main/scala/scalatutorial/sections/ObjectOrientedProgramming.scala
@@ -103,7 +103,7 @@ object ObjectOrientedProgramming extends ScalaTutorialSection {
103
* )
104
*
105
* def makeString(r: Rational) =
106
- * r.numer + "/" + r.denom
+ * s"${r.numer}/${r.denom}"
107
* }}}
108
109
* And then:
@@ -133,7 +133,7 @@ object ObjectOrientedProgramming extends ScalaTutorialSection {
133
* new Rational(numer * r.denom + r.numer * denom, denom * r.denom)
134
* def mul(r: Rational) = ...
135
* ...
136
- * override def toString = numer + "/" + denom
+ * override def toString = s"$numer/$denom"
137
* }
138
139
0 commit comments