class
Test {
private Test t = new Test();
private Test(){}
public static Test getInstance()
{
return t;
}
}
In this example getInstance is factory method.
factory method is just a fancy name. Any method which create or return object of the class can be factory method.
Please let me know If I am wrong somewhere.