Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > a boolean metho...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 15864 of 16566
Post > Topic >>

a boolean method inside an inner class.....

by maya <maya778899@[EMAIL PROTECTED] > Mar 6, 2008 at 10:20 PM

I have a problem with this code:

         String[] textFileNames = directory.list(new FilenameFilter() {
              public boolean accept(File dir, String name) {
                    return name.endsWith(".JPG");
                     }
                 });



this is from a class I adapted from this example:

    http://www.zanthan.com/itymbi/archives/000805.html

I need to test for whether the file name ends with ".jpg" or ".JPG".. 
(found out the hard way that this method is case-sensitive....;)

I don't know how to declare this method so it can accept ".JPG" or 
".jpg"...  (also this method is called nowhere in this Rename class.. so 
what's the purpose of it...)

thank you...
 




 8 Posts in Topic:
a boolean method inside an inner class.....
maya <maya778899@[EMAI  2008-03-06 22:20:21 
Re: a boolean method inside an inner class.....
Knute Johnson <nospam@  2008-03-06 19:51:51 
Re: a boolean method inside an inner class.....
Roedy Green <see_websi  2008-03-07 07:53:29 
Re: a boolean method inside an inner class.....
Lew <lew@[EMAIL PROTEC  2008-03-07 07:25:39 
Re: a boolean method inside an inner class.....
maya <maya778899@[EMAI  2008-03-07 09:47:17 
Re: a boolean method inside an inner class.....
Ian Shef <invalid@[EMA  2008-03-07 19:23:45 
Re: a boolean method inside an inner class.....
Lew <lew@[EMAIL PROTEC  2008-03-07 23:48:49 
Re: a boolean method inside an inner class.....
Roedy Green <see_websi  2008-03-07 23:45:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:39:56 CST 2008.