+ 1
Fill in the blanks to output the size of the file called "db.csv" if it exists.
6 Answers
+ 1
if File.file?("db.csv")
puts File.size("db.csv")
end
0
Fill in the blanks to check if the file exists and output its contents if it does.
Answer:
if File.file?("myfile")
puts File.read("myfile")
end
0
Fill in the blanks to determine whether the file exists.
class A {
public static void main(String args[ ]) {
File file =
File("a.txt");
if(file.
()) {
System.out.println("Yes");
}
}
}
0
Answer:
1. new
2. exists
0
new
exists
- 1
new