For the following code:
package FileOperations
import java.net.URL
object FileOperations {
def processWindowsPath(p: String): String {
"file:///" + p.replaceAll("\\", "/")
}
}
Compiler gives an error:
> scalac FileOperations.scala
FileOperations.scala:6: error: illegal start of declaration
"file:///" + p.replaceAll("\\", "/")
Why? How to fix?