Skip to content

Tag Archives: Guava-Longs

Longs.indexOf(long[] array, long[] target) method of Guava’s Longs Class accepts two parameters array and target. If the target exists within the array, the method returns… Read More
The Longs.asList() method of Guava’s Longs Class accepts a long array as a parameter and returns a list which has the fixed size. The returned… Read More
Longs.indexOf(long[] array, long target) method of Guava’s Longs Class accepts two parameters array and target. If the target exists within the array, the method returns… Read More
The concat() method of Longs Class in the Guava library is used to concatenate the values of many arrays into a single array. These long… Read More
The checkedSubtract(long a, long b) is a method of Guava’s LongMath Class which accepts two parameters a and b, and returns their difference. Syntax: public… Read More
The toArray() method of Longs Class in the Guava library is used to convert the long values, passed as the parameter to this method, into… Read More
The join() method of Longs Class in the Guava library is used to combine or join all the given long values separated by a separator.… Read More
The lastIndexOf() method of Longs Class in Guava library is used to find the last index of the given long value in a long array.… Read More
Longs.max() is a method of Longs Class in Guava library which is used to find the greatest value present in an array. The value returned… Read More
Longs.min() is a method of Longs Class in Guava library which is used to find the least value present in an array. The value returned… Read More
The factorial(int n) method of Guava’s LongMath Class returns the product of the first n positive integers, which is n!. Syntax : public static long… Read More
Longs.hashCode() is a method of Longs Class in Guava Library which is used to return a hash code for a long value. The hashCode is… Read More
The Longs.contains() method of Guava’s Longs Class is used to check if a value i.e. target is present in the array or not. This target… Read More
Longs.compare() method of Guava’s Longs Class is used to compare the two specified long values. These values are passed as the parameter and the result… Read More