- the static members I mentioned in class that correspond to the maximum and minimum values are MAX_VALUE and MIN_VALUE. For example, Integer.MAX_VALUE refers to the maximum value of an integer.
- I mentioned valueOf() as a method that takes in no arguments and returns a double. This is wrong. There are two methods that confuse me :
- doubleValue() takes in no arguments and returns a double. This is what I explained in class. - valueOf(String str) takes in a string and returns an object of class Double.
So to read in a double, you do double d = Double.valueOf(stdin.readLine).doubleValue();
(Q : Why the above works even though doubleValue is not a static method ?)
- I might have mentioned that there are no class of the name Float. This is wrong again. There is a class called Float and it is similar to Double.
(Q : Why do we need the class Float ? Can't we do everything with Double ?)
- Sorry for the confusions !