This section illustrates you how to get the file type. In the given example, we have create an instance of the class File and passed the file 'Hello.txt' to the constructor of this class. The method chooser.getTypeDescription(file) of class JFileChooser returns the file type.
Here is the code of GetFileType .java
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: November 6, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles