I want to know the meaning of & in the example below:
class1 &class1::instance(){
///something to do
}
This means your method returns a reference to a method1 object. A reference is just like a pointer in that it refers to the object rather than being a copy of it, but the difference with a pointer is that references:
So they are a sort of light, safer version of pointers.