src/share/classes/java/lang/Float.java

Print this page
rev 6091 : 7088952: Add size in bytes constant "BYTES" to primitive type wrapper types
Summary: Adds a constant BYTES to each of the primitive wrapper classes (Byte, Character, Double, Float, Integer, Long, Short) with the calculation Primitive.SIZE / Byte.SIZE already made.
Reviewed-by: smarks, darcy

*** 119,128 **** --- 119,135 ---- * @since 1.5 */ public static final int SIZE = 32; /** + * The number of bytes used to represent a {@code float} value. + * + * @since 1.8 + */ + public static final int BYTES = SIZE / Byte.SIZE; + + /** * The {@code Class} instance representing the primitive type * {@code float}. * * @since JDK1.1 */