Commit 33dc3219 authored by Trisha Gee's avatar Trisha Gee
Browse files

[Ch10] Extra Math example to fill up the new page

parent 2ac841a3
Loading
Loading
Loading
Loading
+8 −1
Changes for src/main/java/ch10/MathMethods.java: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -39,8 +39,15 @@ public class MathMethods {
    System.out.println("y = " + y);
  }

  static void sqRt() {
    double x = Math.sqrt(9);    //return 3
    System.out.println("x = " + x);
    double y = Math.sqrt(42.0); // returns 6.48074069840786
    System.out.println("y = " + y);
  }


  public static void main(String[] args) {
    max();
    sqRt();
  }
}