Why illegal start of declaration in Scala?

For the following code: package FileOperations import java.net.URL object FileOperations { def processWindowsPath(p: String): String { "file:///" + p.replaceAll("\\", "/") } } Co...