为什么c=(a+b)*2的时候会出错啊
package com.imocc;
import java.util.Scanner;
public class Rectangle extends Shape {
public static void main(String[] args) {
int a,b;
Scanner input=new Scanner(System.in);
System.out.println("请输入长");
a=input.nextInt();
System.out.println("请输入宽");
b=input.nextInt();
}
@Override
public void zhouzhang() {
// TODO Auto-generated method stub
int c;
c=(a+b)*2;
System.out.println("长方形的周长是"+c);
}
@Override
public void mianji() {
// TODO Auto-generated method stub
int s;
s=a*c;
System.out.println("长方形的面积是"+s);
}
}