If I try to use IOException without the fully qualified name and without importing, I get a compilation error. But it doesn’t happen when I do the same with, say, RuntimeException or Exception.
Why is that?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Classes from package
java.lang.need not be imported. It’s not just RuntimeException, but also stuff like Object and String.