class SrParam1
{
public static void main(String args[])
{
SrPower sp=new SrPower();
sp.doPower(20,40);
int A=20,B=40;
doPower(A,B);
System.out.println("A="+sp.A+",B="+sp.B);
}
static void doPower(int passA,int passB)
{
passA=passA*passA;
passB=passB*passB;
System.out.println("passA="+passA+",passB="+passB);
}
}
class Srpower
{
int A,B;
void doPower(int passA,int passB)
{
A=passA*passA;
B=passB*passB;
}
}
{
public static void main(String args[])
{
SrPower sp=new SrPower();
sp.doPower(20,40);
int A=20,B=40;
doPower(A,B);
System.out.println("A="+sp.A+",B="+sp.B);
}
static void doPower(int passA,int passB)
{
passA=passA*passA;
passB=passB*passB;
System.out.println("passA="+passA+",passB="+passB);
}
}
class Srpower
{
int A,B;
void doPower(int passA,int passB)
{
A=passA*passA;
B=passB*passB;
}
}
楼主【sure2003】截止到2008-06-26 14:19:36的历史汇总数据(不包括此帖):
发帖数:185 发帖分:8757
结贴数:184 结贴分:8727
未结数:1 未结分:30
结贴率:99.46 % 结分率:99.66 %
值得尊敬
A=400,B=1600
class SrpowerSrPower sp=new SrPower();
class Srpower
{
int A,B;
void doPower(int passA,int passB)
{
A=passA*passA;
B=passB*passB;
}
}