diff --git a/physics/relativity_equation/java/relativity_equation.java b/physics/relativity_equation/java/relativity_equation.java new file mode 100644 index 000000000..943ad9843 --- /dev/null +++ b/physics/relativity_equation/java/relativity_equation.java @@ -0,0 +1,12 @@ +/** + * Created by robertoduessmann on 03/10/17. + */ +public class RelativityEquation { + + private static final double SPEED_LIGHT = 299792458; + + public static double getEnergy(double mass) { + //E = mc2 + return mass * Math.pow( SPEED_LIGHT, 2 ); + } +} \ No newline at end of file