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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 5 deletions
This file was deleted.

images/file_example_1.jpg

99.7 KB
Loading

images/file_example_2.jpg

99.7 KB
Loading

pom.xml

Lines changed: 4 additions & 4 deletions
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

Lines changed: 0 additions & 187 deletions
This file was deleted.

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

Lines changed: 0 additions & 23 deletions
This file was deleted.

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

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy