HEHE :)
a conveneince method is a method that combines making a new method and using
existing code.
The easiest way to explain a convenience method is with an example:
public class MyClass{
public void doImportantStuff(String s){
//do all stuff that needs to be done
}
//now pretend that you need a method that
//must accept an Object for instance, but still do
//all the stuff that the 'doImportantStuff' does
//you dont want to have to have the same code in 2 methods
//because that is inefficient, so you just make a conveneince
//method that combines making a new method and using existing code
//convience method
public void doImportantStuff(Object obj){
doImportantStuff(obj.toString());
}
}
On Sat, 13 Dec 2003 11:08:36 -0500, Richard O. Hammer wrote
> I keep coming across methods which are called "convenience" methods
> in their documentation. Gosh, I'm glad. I mean I'd hate for a
> method to be inconvenient.
>
> What does this mean?
>
> Thanks,
> Rich
>
> _______________________________________________
> Juglist mailing list
> [EMAIL PROTECTED]
> http://trijug.org/mailman/listinfo/juglist_trijug.org
--
Redi Internet Webmail (http://www.redi.co.za/webmail)
_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org