JAVA BEGINNERS TUTORIAL – Dealing With Numbers 3

this how I review basics of a language to write what I reviewed in blog posts also it will be good interance for Android development. the good news now it become dialy as I need to review also other languages before release some open source case studies this blog post is the last one of numbers series lets view some methods.

min()

The method gives the smaller of the two arguments. The argument can be int, float, long, double.

  • A primitive data types
  • This method Returns the smaller of the two arguments.

Example:

max()

The method gives the maximum of the two arguments. The argument can be int, float, long, double.

  • A primitive data types
  • This method Returns the maximum of the two arguments.

Example:

exp()

The method gives the maximum of the two arguments. The argument can be int, float, long, double.

  • A primitive data types
  • This method Returns the maximum of the two arguments.

Example:

log()

The method returns the natural logarithm of the argument.

  • d — A primitive data types
  • This method Returns the natural logarithm of the argument.

Example:

pow()

The method returns the value of the first argument raised to the power of the second argument.

  • base — A primitive data type
  • exponenet — A primitive data type
  • This method Returns the value of the first argument raised to the power of the second argument.

Example:

sqrt()

The method returns the square root of the argument.

  • d — A primitive data type
  • This method Returns the square root of the argument.

Example:

sin()

The method returns the sine of the specified double value.

  • d — A double data types
  • This method Returns the sine of the specified double value.

Example:

cos()

The method returns the cosine of the specified double value.

  • d — A double data types
  • This method Returns the cosine of the specified double value.

Example:

tan()

The method returns the tangent of the specified double value.

  • d — A double data type
  • This method Returns the tangent of the specified double value.

Example:

asin()

The method returns the arcsine of the specified double value.

  • d — A double data types
  • This method Returns the arcsine of the specified double value.

Example:

acos()

The method returns the arccosine of the specified double value.

double acos(double d)

  • d — A double data types
  • This method Returns the arccosine of the specified double value.

Example:

atan()

The method returns the arctangent of the specified double value.

  • d — A double data types
  • This method Returns the arctangent of the specified double value.

Example:

atan2()

The method Converts rectangular coordinates (x, y) to polar coordinate (r, theta) and returns theta.

  • X — X co-ordinate in double data type
  • Y — Y co-ordinate in double data type
  • This method Returns theta from polar coordinate (r, theta)

Example:

toDegrees()

The method converts the argument value to degrees.

  • d — A double data type.
  • This method returns a double value.

Example:

toRadians()

The method converts the argument value to radians.

  • d — A double data type.
  • This method returns a double value.

Example:

random()

The method is used to generate a random number between 0.0 and 1.0. The range is: 0.0 =< Math.random < 1.0. Different ranges can be achieved by using arithmetic.

  • This method returns a double

Example: