Constructor e`loni qanday?
Class Shakl{ int a; int b; Shakl(int a, int b){ this.a=a; this.b =b;}};
Class Shakl{ int a; int b; Shkle(int a){ a=this.a;}
Class Shakl{ int a; int b; ~Shakl(int a, int b){ this.a=a; this.b =b;}}
Class Shakl{ Int a; int b; Shakl(int a, int b){ this.a=a; this.b =b;}}
this kalit so’zi nimani aglatadi?
joriy obyektga ko’rsatkich
Ixtiyoriy obyektga ko’rsatkich
this ko’rsatkich emas
a va b javoblar to’gri
friend funksiya to’g’ri e’lon qilingan javobni toping?
class myclass {
…..
friend int sum(myclass x);
….
};
class myclass {
…..
friend int sum(Myclass x);
….
};
class myclass {
…..
int friend sum(myclass x);
….
};
class myclass {
…..
int friend sum(Myclass x);
….
};
Dostları ilə paylaş: |