Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
キーワード「Implements」を使用せずに変数とインターフェイスのメソッドを使用できますか。
注: インターフェイスとクラスは同じパッケージに含まれています。
前もって感謝します..!!!
インターフェースは、クラスが果たすべき契約です。それを実装するクラスがない場合は、おそらくインターフェースを誤用しています。
指摘したように、静的メンバー変数にアクセスできますが、そのような設計の必要性についてはまだ疑問があります!