Created
April 8, 2016 14:43
-
-
Save yyYank/93e27aca11283b6f34b535819d00fdab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open class A(open val hoge : String) | |
| class B(override val hoge : String) : A(hoge) | |
| fun main(args: Array<String>) { | |
| val a = "a" | |
| val b = "a" | |
| val c = 3 | |
| val d = 3 | |
| val e = A("hoge") | |
| val f = A("hoge") | |
| val g = B("hoge") | |
| println(a == b) | |
| println(a === b) | |
| println(c == d) | |
| println(c === d) | |
| println(e == f) | |
| println(e === f) | |
| println(e == e) | |
| println(e === e) | |
| println(f == g) | |
| println(f===g) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
true
true
true
true
false
false
true
true
false
false