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
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
Classes from package java.lang.
need not be imported. It's not just RuntimeException, but also stuff like Object and String.