如何将int数组设置为另一个int数组

时间:2015-09-14 09:30:46

标签: java arrays

如何将<plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.2.0</version> <configuration> <charset>${project.build.sourceEncoding}</charset> <recompileMode>modified-only</recompileMode> <scalaCompatVersion>2.11</scalaCompatVersion> <scalaVersion>2.11.5</scalaVersion> <jvmArgs> <jvmArg>-Xmx1024m</jvmArg> <jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg> </jvmArgs> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </execution> </executions> </plugin> 数组设置为另一个int[]

示例:

int[]

int array[] = new int{1, 2, 3, 4, 5};
int array2[] = new int[]array;

但它不起作用!

有人可以告诉我怎么做?

1 个答案:

答案 0 :(得分:4)

为什么你没有尝试最明显的:

which.max(A)