cie*_*bor 5 methods scala compilation function public-method
我写了这个方法:
public def getXScaleFactor(panelWidth: Int): Double = {
return (panelWidth / (samplesContainer[0].length.asInstanceOf[Double]))
}
Run Code Online (Sandbox Code Playgroud)
我有编译问题:
[error] ./src/main/scala/Controllers/TrackController.scala:85: ';' expected but 'def' found.
[error] public def getXScaleFactor(panelWidth: Int): Double {
[error] ^
Run Code Online (Sandbox Code Playgroud)
这段代码有什么问题?