概述
1.
示例:
计算矩形面积
class area{
float lenth;
float weight;
flost a(){
float re=lenth*weight;
return re;
}
}
public class b{
public static void main(String args[]){
area first;
first=new area();
first.lenth=10;
first.weight=2;
System.out.print(first.a)
}
}