Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Compile Error ,真不明白这编译器是什么型号的?

Posted by along4 at 2005-03-15 15:43:36 on Problem 1000
以下是我的程序,基本上都是仿照F&Q里面的
public class Main
{
    public static void main (String args[]) throws Exception
    {
        BufferedReader in = 
            new BufferedReader(
                new InputStreamReader(System.in));

        String in_line = in.readLine();
        StringTokenizer st = new StringTokenizer(in_line);
        int a = Integer.parseInt(st.nextToken());
        int b = Integer.parseInt(st.nextToken());
        if(a<0||b>10)
        System.out.println("Input error");
        else System.out.println(a+b);
    }
}

但是结果是Compile Error
而且有5处无法编译,
C:\temp\361829\Main.java:5: cannot find symbol
symbol  : class BufferedReader
location: class Main
        BufferedReader in = 
        ^
C:\temp\361829\Main.java:6: cannot find symbol
symbol  : class BufferedReader
location: class Main
            new BufferedReader(
                ^
C:\temp\361829\Main.java:7: cannot find symbol
symbol  : class InputStreamReader
location: class Main
                new InputStreamReader(System.in));
                    ^
C:\temp\361829\Main.java:10: cannot find symbol
symbol  : class StringTokenizer
location: class Main
        StringTokenizer st = new StringTokenizer(in_line);
        ^
C:\temp\361829\Main.java:10: cannot find symbol
symbol  : class StringTokenizer
location: class Main
        StringTokenizer st = new StringTokenizer(in_line);
                                 ^
5 errors

真不明白什么回事,哪位兄弟用java过了此题的,能否借我参考?QQ:33025498

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator