1
1

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 staticとは何か。(初心者が書いた)

1
Posted at

Javaにおいてstaticを理解せずに使用しているため改めて調べ、ここに記す。

Javaではメソッドの作成時に修飾子として、staticを使用する。

test
//staticを使用したメソッドの例
  public static void test(){

  }

このtestメソッドはクラス内に属すると呼称され、呼び出しにインスタンスの生成を不要とする性質を有する。

インスタンス
//インスタンスの例
Player p1 = new Player();

固有のオブジェクトに依存しない共通処理、ないしは共通データを扱う場合に使用される。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?