There is no difference. In each case you are creating a FileInputStream
. The first is probably better programming style in that you should generally use a classes interface
instead of the concrete class to allow for flexibility (i.e you decide to use a BufferedInputStream
).