Java Boolean booleanValue() method

The booleanValue()  method of Java Boolean class returns a Boolean value for the specified Boolean argument.  Syntax public Boolean booleanValue()  Parameters NA Return Value This method returns the primitive value of specified Boolean object. Example 1

Output

Example2: …

Read moreJava Boolean booleanValue() method

Java Boolean logicalOr() Method

The logicalOr() method of Java Boolean class returns the result of implementing logical OR operation on the specified Boolean operands. Syntax: public static boolean logicalOr (boolean a, boolean b) Parameters: The parameters ‘a’ and ‘b’ represents first and second operands. …

Read moreJava Boolean logicalOr() Method

Java Boolean logicalAnd() Method

The logicalAnd() method of Java Boolean class returns the result of implementing logical AND operation on the specified Boolean operands. Syntax: public static boolean logicalAnd (boolean a, boolean b) Parameters: The parameters ‘a’ and ‘b’ represents first and second operands. …

Read moreJava Boolean logicalAnd() Method

MultiAutoComplete TextView

Multi Auto Complete is a TextView Field user-interface which is used to get multiple strings from the user. XML file:

This Example is developed and tested in Android Studio 3.1.4 API level 26 Java File:

MultiAutoComplete Example:

Button Widget in Android Tutorial

Explanation: Button is a widget under Buttons section which is used to execute specific code. Example: XML file:

Java File:

Before Click:    After First Click:    After Second Click:  

Java Math hypot() Method

The hypot() method of Math class returns the square root for the expression x2 + y2 without the intermediate underflow or overflow . Syntax: public static double hypot(double x, double y) Parameters: The parameters ‘x’ and ‘y’ represent the values. …

Read moreJava Math hypot() Method

Java Math log() Method

The log() method of Math class returns the natural logarithmic value for the specified double argument. Syntax: public static double log(double a) Parameters: The parameter ‘a’ represents the value. Return Value: The log() method returns the natural base e logarithm …

Read moreJava Math log() Method

Java Math log1p() Method

The log1p() method of Math class returns the natural logarithmic sum for the specified double argument and 1. Its value is much closer to result of ln(1 + x). Syntax: public static double log1p (double a) Parameters: The parameter ‘a’ …

Read moreJava Math log1p() Method

Java Math log10() Method

The log10() method of Math class returns the base 10 logarithmic value for the specified double argument. Syntax: public static double log10(double a) Parameters: The parameter ‘a’ represents a double value. Return Value: The log10() method returns the base 10 …

Read moreJava Math log10() Method

Java Math min() Method

The min () method of Math class returns the smaller of two arguments. The arguments can be of double, float, int or long data type. Syntax: public static double min (double a, double b) public static float min (float a, …

Read moreJava Math min() Method

Java Math max() Method

The max() method of Math class returns the greater of two arguments. The arguments can be of double, float, int or long data type. Syntax: public static double max(double a, double b) public static float max(float a, float b) public …

Read moreJava Math max() Method

Java Math nextAfter() Method

The nextAfter() method of Math class returns the floating-point value adjacent to the first argument in direction of the second argument. Syntax: public static double nextAfter (double start, double direction) public static float nextAfter (float start, double direction) Parameters: The …

Read moreJava Math nextAfter() Method

Java Math nextUp() Method

The nextUp() method of Math class returns the floating-point number adjacent to the argument in direction of the positive infinity. Syntax: public static double nextUp (double d) public static float nextUp (float f) Parameters: The parameters ‘d’ and ‘f’ represent …

Read moreJava Math nextUp() Method

Java Math nextDown() Method

The nextDown() method of Math class returns the floating-point number adjacent to the argument in direction of the negative infinity. Syntax: public static double nextDown (double d) public static float nextDown (float f) Parameters: The parameters ‘d’ and ‘f’ represent …

Read moreJava Math nextDown() Method