2005-09-13から1日間の記事一覧
前のエントリのJavaScriptサンプルに対応するJavaコードです。 /* Counter.java */public class Counter { public static final int UPPER_BOUND = 10; public static final int MAX_COUNTERS = 3; public static int counters = 0; public int value; publi…
前々回(第7回)、前回(第8回)で、次のことを説明しました。 すべてのオブジェクトは、__proto__チェーン(長さ0かも知れない)を持つ。 オブジェクトのプロパティ検索は、__proto__チェーンに沿って実行される。 すべての関数オブジェクトは、prototypeオ…