This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes throws Java.io.IOException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "throws Java.io.IOException" Watch "throws Java.io.IOException" New topic
Author

throws Java.io.IOException

Harry Jones
Greenhorn

Joined: Mar 19, 2010
Posts: 20
Are these two statements the same, or is one better than the other?


Thanks.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

They are the same.

If you just use "IOException" instead of "java.io.IOException", you will have to put an import statement at the top of your source file:

import java.io.IOException;

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: throws Java.io.IOException
 
Similar Threads
Table Viewer GUI from a Database
java.lang.NullPointerException
Jrame not visible when Try to run from Unit Test
how this program works i didn't understand