Arrays.spliterator(long[]): This method is available in java.util.Arrays class of Java.
Syntax:
OfLong java.util.Arrays.spliterator(long[] array)
This method takes one argument of type long array as its parameter. This method returns a Spliterator.OfLong covering all of the specified array.
Parameters: One parameter is required for this method.
array: the array, assumed to be unmodified during use.
Returns: the spliterator for the array elements.
Exceptions: NA
Approach
Java
import java.util.Arrays;public class Arraysspliteratorlong {public static void main(String[] args) {long array[] = { 1, 2, 10, 5 };System.out.println(Arrays.spliterator(array));}}
Output:
java.util.Spliterators$LongArraySpliterator@39ed3c8d
No comments:
Post a Comment