Verify the size of a file called     input.txt     for a file in the current working directory, and another one in the file system root.




import java.io.File
 
object FileSize extends App {
  val name = "pg1661.txt"
 
  println(s"$name  : ${new File(name).length()} bytes")
  println(s"/$name : ${new File(s"${File.separator}$name").length()} bytes")
}