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
What is literal example?
What is a singleton class? Give a practical example of its usage.
What are recursive functions?
Can we extend singleton class?
What is the purpose of javac exe?
What is the difference between the direct buffer and non-direct buffer in java?
What are advantages of exception handling in java?
What are the wrapped, classes?
what is meant by Garbage collection?
What is ternary operator?
What is super keyword explain with example?
What is a void in java?
Explain what is encapsulation?
Tell some latest versions in JAVA related areas?
What is anti pattern in cyber security?