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 the purpose of static methods and variables?
What is package private scope in java?
What is ide with example?
What is continuity of a function?
What is the statements?
Explain about fail safe iterators in java?
What is method reference in java?
Where we write javascript code in html page?
What is the symbol for line break?
What is the maximum size of hashmap in java?
What are basic data types?
Discuss about garbage collector in Java.
What are the two basic ways in which classes that can be run as threads may be defined?
What happens when I use / and % with a negative numerator?
Program to Find the second largest element in an array.