import java.io.*;
class Demo
{
public static void main(String args[])
{
File f=new File("1234.msg");
String arr[]=f.list();
System.out.println(arr.length);
}
}
Answer Posted / sarath
so what is your question..?
the code gives compilation error... because it should throw a IOException..
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Can we have two methods in a class with the same name?
What is a wrapper method?
What does super keyword do?
What are different access specifiers in java? Explain
Is linked list a linear or non-linear data structure?
What does you mean in math?
What are the 3 types of loops in java?
What are the actions that can occur when a thread enters blocked state?
How many arguments can a method have java?
What is the purpose of garbage collection in java, and when is it used?
What are the states of thread in java?
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
What is the difference between import java.util.date and java .util?
What is the difference between scrollbar and scrollpane?
What is the byte range?