0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Java解説 20250428

Posted at

サブクラス

継承元のクラス

[修飾子] class サブクラス名 extends スーパークラス{}

final修飾子

・変数に付けた場合は定数。
・メソッドにつけた場合、サブクラス側でそのメソッドをオーバーライドできない。

this

・メンバ変数名とローカル変数名が同じ場合、ローカル変数が優先して参照されます。このときにメンバ変数を指定する場合にはthisをつける。
・インスタンス変数への適用:this.変数名;
・コンストラクタ呼び出しの適用:this();

ローカル変数

メソッドの中で宣言されている変数。

メンバ変数

クラスの中で宣言されている変数。


オラクル認定資格教科書 Javaプログラマ Bronze SE(試験番号1Z0-818)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?