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 / sri
this code gives Nullpointer exception
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What will happen to the exception object after exception handling?
Is arraylist zero based?
Why is it called a string?
Why runnable interface is used in java?
Is array size fixed in java?
What is the meaning of immutable regarding string?
why java uses class level type casting ?
How do you write a scanner class in java?
Convert a BST into a DLL and DLL to BST in place.
What is bytecode verifier?
What does you mean in math?
How do listeners work?
What causes memory leak in java?
explain what is transient variable in java?
What is a superclass?