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 tochararray in java?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
What are the basic concepts of OOPS in java?
How many types of interfaces are there?
What kind of variables can a class consist?
How does linkedlist work in java?
What is comparator in java?
What is ctrl m character?
What do you mean by platform independence? What is an interface?
Explain the overview of UDP messaging.
What language is an assembler written in?
Can you explain the cs option of java interpreter?
What are constants and how to create constants in java?
What are exception handling keywords in java?
How many functional interfaces does java 8 have?