Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
java-demo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leona
W
web
backend
java-demo
Commits
3c466c7d
Commit
3c466c7d
authored
Mar 09, 2020
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
9ed432e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
0 deletions
+118
-0
shuffle/pom.xml
shuffle/pom.xml
+75
-0
shuffle/src/main/java/org/example/App.java
shuffle/src/main/java/org/example/App.java
+23
-0
shuffle/src/test/java/org/example/AppTest.java
shuffle/src/test/java/org/example/AppTest.java
+20
-0
No files found.
shuffle/pom.xml
0 → 100644
View file @
3c466c7d
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.example
</groupId>
<artifactId>
shuffle
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<name>
shuffle
</name>
<!-- FIXME change it to the project's website -->
<url>
http://www.example.com
</url>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
1.7
</maven.compiler.source>
<maven.compiler.target>
1.7
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>
maven-clean-plugin
</artifactId>
<version>
3.1.0
</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
3.0.2
</version>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.8.0
</version>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.22.1
</version>
</plugin>
<plugin>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
3.0.2
</version>
</plugin>
<plugin>
<artifactId>
maven-install-plugin
</artifactId>
<version>
2.5.2
</version>
</plugin>
<plugin>
<artifactId>
maven-deploy-plugin
</artifactId>
<version>
2.8.2
</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>
maven-site-plugin
</artifactId>
<version>
3.7.1
</version>
</plugin>
<plugin>
<artifactId>
maven-project-info-reports-plugin
</artifactId>
<version>
3.0.0
</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
shuffle/src/main/java/org/example/App.java
0 → 100644
View file @
3c466c7d
package
org.example
;
import
java.util.*
;
/**
* Hello world!
*
*/
public
class
App
{
public
static
void
main
(
String
[]
args
)
{
Random
rand
=
new
Random
(
47
);
Integer
[]
ia
={
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
for
(
int
i
=
0
;
i
<
100
;
i
++){
List
<
Integer
>
list1
=
new
ArrayList
<
Integer
>(
Arrays
.
asList
(
ia
));
System
.
out
.
println
(
"Before shuffling: "
+
list1
);
Collections
.
shuffle
(
list1
,
rand
);
System
.
out
.
println
(
"After shuffling: "
+
list1
);
System
.
out
.
println
(
"array: "
+
Arrays
.
toString
(
ia
));
}
}
}
shuffle/src/test/java/org/example/AppTest.java
0 → 100644
View file @
3c466c7d
package
org.example
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
org.junit.Test
;
/**
* Unit test for simple App.
*/
public
class
AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public
void
shouldAnswerWithTrue
()
{
assertTrue
(
true
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment