public class LeyNewton {
  public final static double G = 6.67E-19;

  public double fuerza(double m1,double m2,double r) throws Exception {

      double f=0;
      if (r !=0) { 
            f = G*m1*m2/(r*r);
      } else {
        throw new Exception("distancia cero");
      }
      return f;

  }

}