I've head of people using this "FileReader", isn't it just as easy to just use Scanner?
like so:
Thanks,
Justin Fox
You down with OOP? Yeah you know me!
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Depends what JRE's you want to support. Scanner was only introduced in Java 1.5.
Joanne
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
posted
0
Yeah, generally I think Scanner is better for just about everything, but it simply didn't exist in earlier JDKs - that's why people use FileReader.
"I'm not back." - Bill Harding, Twister
Justin Fox
Ranch Hand
Joined: Jan 24, 2006
Posts: 802
posted
0
oh ok.
why would you use 1.5? I mean, version 6 is out now...
Justin Fox
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35237
7
posted
0
Well, Scanner was in 1.5, so the proper question would be "who wants to use 1.4?" Reading through the posts here on JavaRanch, the answer is obviously "many people".
As to why someone would use Java 1.5, well, not all operating systems have a released version of Java 6 yet, OS X being the most prominent one.
Also a lot of code was written when 1.4 was the latest JRE. Even if newer developments of this code are being written in 1.6, people are not going to want to rewrite existing, correctly functioning code just to use a different class. [ April 04, 2008: Message edited by: Joanne Neal ]