Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

throws Java.io.IOException

 
Harry Jones
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are these two statements the same, or is one better than the other?


Thanks.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15484
43
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic