LoginSignup
0
0

More than 5 years have passed since last update.

JAVA学習履歴 final修飾子とstatic修飾子

Last updated at Posted at 2017-06-11

ノート取りとは違った勉強法に取りかかろうとこちらに記載。
すごく中途半端な部分からの書き出し。

Javaにおける修飾子

識別子の性質を形容する予約語
→クラス、メソッド、それに変数をどういう風にしていこう…なんていう風に理解

今回学習する修飾子はfinalとstatic

まずはfinal
final修飾子はフィールド、クラスにつける。
これをする事でフィールドの場合「値が変更出来なくなる」
クラスの場合は「継承が出来なくなる」

static修飾子
フィールドやメソッドに使用
これを付ける事で同じクラスから生成したオブジェクトは値を同一にすることが出来る

staticに関してはあまりピンときていないので要復習
まずは一通り学習してみて、分からない部分の洗い出しをしよう。

0
0
4

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