Questions tagged «java-10»


1
为什么array [idx ++] + =“ a”在Java 8中增加一次idx,而在Java 9和10中增加两次?
为了挑战,一位高尔夫球手代码 编写了以下代码: import java.util.*; public class Main { public static void main(String[] args) { int size = 3; String[] array = new String[size]; Arrays.fill(array, ""); for(int i = 0; i <= 100; ) { array[i++%size] += i + " "; } for(String element: array) { System.out.println(element); } } } 在Java …
751 java  java-8  javac  java-9  java-10 

7
无法使用Maven编译简单的Java 10 / Java 11项目
我有一个琐碎的Maven项目: src └── main └── java └── module-info.java pom.xml pom.xml: <groupId>org.example</groupId> <artifactId>example</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>example</name> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.7.0</version> <configuration> <release>10</release> </configuration> </plugin> </plugins> </build> 当我通过构建项目时mvn -X install -DskipTests=true,它失败了: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile (default-testCompile) on project example: Execution default-testCompile of goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile failed. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at …

6
如何在Ubuntu下安装JDK 10?
如何在Ubuntu上安装Java Development Kit(JDK)10? Oracle帮助中心上的安装说明仅说明了如何在Linux平台上下载和提取归档文件,而无需进行任何系统设置。
73 java  ubuntu  java-10 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.