MATHS

THESE ARE SOME FUMCTIONS RELATRED TO MATHEMATICAL OPERATION IN JAVA

  1. max function
class maths {
    public static void main(String[] args) {
        System.out.println(Math.max(5,6));
    }
}

OUTPUT -

6

  1. min function
class maths {
    public static void main(String[] args) {
        System.out.println(Math.min(5,6));
    }
}

OUTPUT -

5
  1. random function - it returns any random number between 0 to 1
class maths {
    public static void main(String[] args) {
        System.out.println(Math.random);
    }
}

OUTPUT -

0.49694943512926515