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
Why we used break and continue statement in java?
Why do we use bufferedreader?
What is unicode used for?
What do you mean by exception handling in Java?
What is the longest unicode character?
Is this valid in java ? Can we instantiate interface in java?
what are abstract functions?
What is ordered map in java?
Explain working of call by reference function invoking.
What comes to mind when someone mentions a shallow copy in java?
What's the purpose of static methods and static variables?
Can a final method be overloaded?
What is composition in java?
What exactly is methodology?
What do you mean by append?