Java "throws IOException" problem
Lo all, can someone tell me what's wrong with this code please:
Code:
import java.io*; |
I'm not too knowledgable about Java, but I don't think a class can throw an exception; only functions can throw exceptions. Try:
Code:
public class test |
Yep, you're right. Thanx a lot.
|
wapcaplet is correct, classes are not declared to throw exceptions
|
Re: Java "throws IOException" problem
Quote:
Code:
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Code:
|
Ah yes, good point.
In times like these, it's good to have an editor that gives you a lot of visual clues that a parenthesis or bracket is not closed. Vim for example :) |
All times are GMT -5. The time now is 07:47 AM. |