UOJ Logo SiriusHuang的博客

博客

为什么我这么写是错的,我觉得没毛病啊

2019-01-15 14:52:45 By SiriusHuang

错误提示为:Error occurred during initialization of VM java.lang.OutOfMemoryError: unable to create new native t...

以下是代码

import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException;

class Sum {

public static void main(String[] args) {
    int a = 6, b = 10;

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
        String line = br.readLine();
        String[] aa = line.split(" ");
        a = Integer.valueOf(aa[0]);
        b = Integer.valueOf(aa[1]);
    } catch (IOException e) {
        e.printStackTrace();
    }
    int s = a + b;
    System.out.println(a + " " + b);
    System.out.println(s + "");
}

}

评论

暂无评论

发表评论

可以用@mike来提到mike这个用户,mike会被高亮显示。如果你真的想打“@”这个字符,请用“@@”。