我使用Kotlin getting started guide设置科特林首次上IntelliJ IDEA的具有以下配置: IntelliJ IDEA 2017.2.5
Build #IC-172.4343.14, built on September 26, 2017
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Serv
在Java中有可能通过使private,然后通过publicstatic方法访问它,这个类里面隐藏类的主要构造: public final class Foo {
/* Public static method */
public static final Foo constructorA() {
// do stuff
return new Foo(
我偶然发现了一个问题,即编译“不能以下候选人中选择”时,我指的是rng.max其中rng:IntRange: inline val <T:Comparable<T>> ClosedRange<T>.max get() = endInclusive // max of range
inline val <T:Comparable<T>> Iterable<T>.max get():T? = max