0

In the following simple example from the Java documentation:

public enum Planet {
    MERCURY (3.303e+23, 2.4397e6),
    VENUS   (4.869e+24, 6.0518e6),
    EARTH   (5.976e+24, 6.37814e6),
    MARS    (6.421e+23, 3.3972e6),
    JUPITER (1.9e+27,   7.1492e7),
    SATURN  (5.688e+26, 6.0268e7),
    URANUS  (8.686e+25, 2.5559e7),
    NEPTUNE (1.024e+26, 2.4746e7);
}

Could someone explain why the first column of digits employs the '+' sign where the second uses a more familiar scientific notation?

Thanks,

~Caitlin

CaitlinG
  • 1,955
  • 3
  • 25
  • 35

2 Answers2

2

Both are definitions of exponents.

e+23 or e23 are the same thing. From what I see, column #1 is the mass, column #2 is the radius.

1

I think depends on the DecimalFormat used to represent it, as you know the + sign is optional

pinckerman
  • 4,115
  • 6
  • 33
  • 42