Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we create an object of private class?

973


What is increment in java?

967


How dead lock situation occurs in java and how you can identify it?

998


How many classes can any class inherit java?

972


When should we create our own custom exception classes?

1018


What is string pooling concept?

1081


State one difference between a template class and class template.

1069


Define a package.

1092


Why do we need wrapper class?

1002


Which java ide is used the most?

1010


What about main() method in java ?

1027


What is a substring of a string?

1163


Is arraylist a class in java?

1070


What is a line break?

1033


What variables are stored in stack?

980