A DataInputStream
is just a decorator over an InputStream
(which System.in
is) which allows to read using more convenient methods.
As to the Float.valueOf()
, well, that's curious because Float
has .parseFloat()
as well. Here the code grabs a Float
with .valueOf()
which it turns into the primitive float
type using .floatValue()
, which is unnecessary with Java 1.5+ due to auto unboxing.
And as other answers rightly say, these methods are obsolete anyway.