Skip to content

Commit a82d8cc

Browse files
Java tutorial (#160)
* update java tutorial * update java version:jdk 16 * update jdk version * fixed jdk * fixed using google formater * fixed gradle build
1 parent 261878b commit a82d8cc

File tree

102 files changed

+2093
-551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2093
-551
lines changed

.github/workflows/checkstyle.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
steps:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-python@v2
11-
- name: Set up JDK 12
11+
- name: Set up JDK 16
1212
uses: actions/setup-java@v1
1313
with:
14-
java-version: 12
15-
- run: wget https://github.com/google/google-java-format/releases/download/google-java-format-1.9/google-java-format-1.9-all-deps.jar -O formatter.jar
16-
- run: java -jar formatter.jar --replace --set-exit-if-changed $(find . -type f -name "*.java" | grep ".*/src/.*java")
14+
java-version: 16
15+
- run: wget https://github.com/google/google-java-format/releases/download/v1.11.0/google-java-format-1.11.0-all-deps.jar -O formatter.jar
16+
- run: java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -jar formatter.jar --replace --set-exit-if-changed $(find . -type f -name "*.java" | grep ".*/src/.*java")
1717
- name: Commit Format changes
1818
if: failure()
1919
run: |

.github/workflows/gradle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up JDK 12
15+
- name: Set up JDK 14
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 12
18+
java-version: 14
1919
- name: Grant execute permission for gradlew
2020
run: chmod +x gradlew
2121
- name: Build with Gradle

.github/workflows/maven.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up JDK 12
15+
- name: Set up JDK 16
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 12
18+
java-version: 16
1919
- name: Build with Maven
2020
run: mvn clean test

.lgtm.yml

-5
This file was deleted.

images/file_example_1.jpg

99.7 KB
Loading

images/file_example_2.jpg

99.7 KB
Loading

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<artifactId>untitled</artifactId>
99
<version>1.0-SNAPSHOT</version>
1010
<properties>
11-
<maven.compiler.source>1.8</maven.compiler.source>
12-
<maven.compiler.target>1.8</maven.compiler.target>
11+
<maven.compiler.source>16</maven.compiler.source>
12+
<maven.compiler.target>16</maven.compiler.target>
1313
</properties>
1414
<dependencies>
1515
<dependency>
@@ -30,8 +30,8 @@
3030
<groupId>org.apache.maven.plugins</groupId>
3131
<artifactId>maven-compiler-plugin</artifactId>
3232
<configuration>
33-
<source>9</source>
34-
<target>9</target>
33+
<source>16</source>
34+
<target>16</target>
3535
</configuration>
3636
</plugin>
3737
</plugins>

src/main/java/com/examplehub/basics/Array.java

-187
This file was deleted.

src/main/java/com/examplehub/basics/ArraysExample.java

-23
This file was deleted.

src/main/java/com/examplehub/basics/Break.java

-47
This file was deleted.

src/main/java/com/examplehub/basics/Continue.java

-56
This file was deleted.

0 commit comments

Comments
 (0)