Project: Physical Constants
Write a program that defines and prints the values for the following physical constants:
- Speed of light in vacuum (c)
- Planck constant (h)
- Newton's gravitation constant (G)
- Elementary charge (e)
- Avogadro constant (L)
- Boltzmann constant (k)
Use named constants for all values.
See: [[List of physical constants]]
Output
$ javac -Xlint PhysicalConstants.java
$ java -ea PhysicalConstants
c: 2.9979245800000000e+08
h: 6.6260701500000000e-34
G: 6.6743015000000000e-11
e: 1.6021766340000000e-19
L: 6.0221407600000000e+23
k: 1.3806490000000000e-23