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
How will you reverse a link list without using recursion?
What does super keyword do?
What do you know about the garbage collector in java?
What is the exception hierarchy in java?
What is public static void main?
Explain the importance of join() method in thread class?
What about interthread communication and how it takes place in java?
how are methods defined?
What is meant by null and void?
What is boolean used for?
Can we override compareto method?
What is a website container?
Is char a data type in java?
what is synchronization? : Java thread
Can we have any code between try and finally blocks?