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
can java object be locked down for exclusive use by a given thread? : Java thread
What is the difference between the paint() and repaint() methods in java programming?
What is a variable in java?
Java is Pass by Value or Pass by Reference?
give an example for encapsulation?
What do you mean by global variable?
How to create a thread in java?
Where is java located?
When super keyword is used?
What is abstract class? Explain
explain autoboxing in java?
What is a default constructor and also define copy contrucyor?
How java is similar to c?
Explain when classnotfoundexception will be raised ?
What is the use of static methods?