Avatar
こっちでは reference 型を三つに分けてるけど interface のときの中身には詳しく触れられてないなぁ。
2.4. Reference Types and Values There are three kinds of reference types: class types, array types, and interface types. Their values are references to dynamically created class instances, arrays, or class instances or arrays that implement interfaces, respectively. An array type consists of a component type with a single dimension (whose length is not given by the type). The component type of an array type may itself be an array type. If, starting from any array type, one considers its component type, and then (if that is also an array type) the component type of that type, and so on, eventually one must reach a component type that is not an array type; this is called the element type of the array type. The element type of an array type is necessarily either a primitive type, or a class type, or an interface type. A reference value may also be the special null reference, a reference to no object, which will be denoted here by null. The null reference initially has no run-time type, but may be cast to any type. The default value of a reference type is null. This specification does not mandate a concrete value encoding null.
https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-2.html#jvms-2.4
(edited)
4:20 AM
参照だとは書かれてるか。
4:22 AM
reference 型の値は reference だってトートロジーっぽいな・・・。さっきの文と合わせて考えるとこの reference は単一のポインタと考えて良さそうだけどいまいち確信が持てない・・・。
4:22 AM
#other-lang でやった方がいい気がしてきた。