标识符预期错误

时间:2014-08-14 21:06:50

标签: java

我一直期待着这条线,你能帮我吗?

 System.out.println(a*b);

以下是完整代码:

/**
 * Write a description of class Calculator here.
 * 
 * @author (Aneeqa Rustam) 
 * @version (10/08/2014)
 */
public class Calculator
{
    public static void Calculator (String[] args);

        int a =2000000, b =4000000;
        System.out.println(a*b);

1 个答案:

答案 0 :(得分:2)

public static void Calculator (String[] args);

无效的方法定义

将其更改为

public static void main (String[] args) {

 int a =2000000, b =4000000;
 System.out.println(a*b);

}