Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1394acd

Browse filesBrowse files
committed
1
1 parent aa25998 commit 1394acd
Copy full SHA for 1394acd

File tree

Expand file treeCollapse file tree

42 files changed

+1384
-0
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

42 files changed

+1384
-0
lines changed
Open diff view settings
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ArraysDemo</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Collapse file
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.8
Binary file not shown.
Collapse file
+43Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import java.util.Arrays;
2+
import java.util.Spliterator;
3+
4+
public class ArraysDemo
5+
{
6+
7+
public static void main(String[] args)
8+
{
9+
String[] strArray = { "Apple", "banana", "Orange", "Grapes", "Mango" };
10+
11+
/*
12+
* Type Parameters:
13+
*
14+
* T - type of elements
15+
*
16+
* Parameters:
17+
*
18+
* array - the array, assumed to be unmodified during use
19+
*
20+
* startInclusive - the first index to cover, inclusive
21+
*
22+
* endExclusive - index immediately past the last index to cover
23+
*
24+
* Returns:
25+
*
26+
* a spliterator for the array elements
27+
*/
28+
Spliterator<String> s1 = Arrays.spliterator(strArray, 0, 3);
29+
30+
/*
31+
* Returns:a Spliterator covering some portion of the elements, or null if this
32+
* spliterator cannot be split
33+
*/
34+
Spliterator<String> s2 = s1.trySplit();
35+
36+
System.out.println("spliterator 1");
37+
s1.forEachRemaining(System.out::println);
38+
39+
System.out.println("\nspliterator 2");
40+
s2.forEachRemaining(System.out::println);
41+
}
42+
43+
}
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ArraysDemo</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Collapse file
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.8
Binary file not shown.
Collapse file
+42Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import java.util.Arrays;
2+
import java.util.Spliterator;
3+
4+
public class ArraysDemo
5+
{
6+
7+
public static void main(String[] args)
8+
{
9+
double[] doubleArray = { 1.1, 2.2, 3.3, 4.4, 5.5, 6.6 };
10+
11+
/*
12+
* Parameters:
13+
*
14+
* array - the array, assumed to be unmodified during use
15+
*
16+
* startInclusive - the first index to cover, inclusive
17+
*
18+
* endExclusive - index immediately past the last index to
19+
* cover
20+
*
21+
* Returns:
22+
*
23+
* a spliterator for the array elements
24+
*/
25+
Spliterator<Double> s1 = Arrays.spliterator(doubleArray, 0, 4);
26+
27+
/*
28+
* Returns:
29+
*
30+
* a Spliterator covering some portion of the elements, or
31+
* null if this spliterator cannot be split
32+
*/
33+
Spliterator<Double> s2 = s1.trySplit();
34+
35+
System.out.println("spliterator 1");
36+
s1.forEachRemaining(System.out::println);
37+
38+
System.out.println("\nspliterator 2");
39+
s2.forEachRemaining(System.out::println);
40+
}
41+
42+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.