I want to definite a function like createString
:
def createString(n: Int): String = {
// do something here
result = "?, ?, ?, ?, ?, ?, ? " // thera are n "? " in result
result
}
As I know, ["? "]*n
is the easy way in Python. But I don't know how to do it with Scala. What shoule I do?