Hey Aafreen, The phrase "On the fly" indicates that you can create new extended classes without writing the whole syntax for class creation.
See below an example,
I have created an instance of the interface(Interface1) without creating any new class.
This is what it means, �Anonymous classes are created on the fly�
Hope this helps.
interface Interface1
{
public void callMe();
}
class Example
{
public static void main (
String args [ ] )
{
new Interface1()
{
public void callMe()
{
System.out.println("Anonymous");
}
}.callMe();
}
}