package org.hanqi.pn0120; public class JuXing { JuXing(double chang,double kuan) { this.chang=chang; this.kuan=kuan; } double chang; double kuan; double getMianJi() { return this.chang*this.kuan; } public static void main(String[] args) { JuXing myJX=new JuXing(20,10); System.out.println("计算得到的面积=" +myJX.getMianJi()); } }
课后题修改
时间: 2024-12-15 01:40:53