Edited by Shaquil, 07 August 2015 - 06:47 AM.
Jump to content
Posted 02 June 2013 - 05:57 PM
Short of reflection, no. Also, don't use reflection =].
Anonymous inner classes are usually used to override the behaviour of one or more methods, most commonly single method interfaces such as Runnable, Callable and event handlers.
Thanks. I've never heard of reflection, so I'll have to look it up.
Posted 03 June 2013 - 02:53 AM
Yes exactly, with "a few methods" usually being 1 or 2.
are anonymous inner classes mostly for overloading a few methods without creating an entirely new class to do so?