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 is difference between static variable and global variable?
What are inner classes or non static nested classes in java?
What is bool mean?
How to implement an arraylist in java?
How do you calculate roots in java?
How do you remove an object from an arraylist in java?
Describe method overriding
What is difference overloading and overriding?
Java Compiler is stored in JDK, JRE or JVM?
What is the buffer limit?
How list contains works in java?
Which is faster call by value or call by reference?
Is hashset ordered?
Is array synchronized in java?
How many types of methods are there?