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 difference between integer parseint and integer valueof?
What do you mean by an interface in java?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?
What is Gang of four design patterns
What is string in java?
What is identifier give example?
In how many ways we can create threads in java?
What is tcp and udp?
How use .contains in java?
Is intellij better than eclipse?
Can a main method be declared final?
What is meant by design patterns?
Why does my function print none?
How do you reverse sort a list in java?
Why is the main method static?