抽象输出面积System输出提示错误

package xiaochengxu;

import java.util.Scanner;

public class mianjizhengfangxing extends mianji1 {


Scanner zhengfangxing=new Scanner(System.in);

System.out.print("请输入正方形的长:");

int chang=zhengfangxing.nextInt();

System.out.print("请输入正方形的宽:");

int kuan=zhengfangxing.nextInt();

@Override

public  void mianji() {

// TODO Auto-generated method stub

int mianji=chang*kuan;

System.out.println("正方形的面积为"+mianji);

}

@Override

public  void zhouchang() {

// TODO Auto-generated method stub

int zhouchang=(chang+kuan)*2;

System.out.println("正方形的面积为"+zhouchang);

}


}


丿潮流灬星游
浏览 1211回答 2
2回答

摩诃迦叶

你好歹把错误提示显示出来啊
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java