有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java无法构建实际的Intellij IDEA社区版

我正在努力跟上these steps

我对“做项目”这一步有个问题:

invalid inferred types for T,A; inferred type does not conform to declared bound(s)
inferred: java.lang.Object
bound(s): T

在(“returnaddall(newHashSet(items));”中

@NotNull
public static <T> Set<T> set(@NotNull T ... items) {
  return addAll(newHashSet(items));
}

@NotNull
public static <T, A extends T, C extends Collection<T>> C addAll(@NotNull C collection, @NotNull A... elements) {
  //noinspection ManualArrayToCollectionCopy
  for (T element : elements) {
    collection.add(element);
  }
  return collection;
}

这似乎很奇怪——源代码是真实的,我认为,这可能是项目配置中的一个问题。 有什么想法吗


共 (1) 个答案

  1. # 1 楼答案

    更多信息会有所帮助。比如你在运行哪个java?您的环境设置已列出