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 write a class without main method in java?
how to write a server program and sending the mails to the server using smtp protocol please help me
what are the states associated in the thread? : Java thread
What is string in java? String is a data type?
Explain the meaning of java applet.
What is the default execution method in java?
What is the difference between path and classpath variables?
Why can't we make a class private in java?
Explain aggregation in java?
What is the reason behind using constructors and destructors?
what is meant by Byte code concept in Java?
Why is serialization required?
What is mvc in java?
What does java stand for?
What are the types of sockets in java?