0
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?

More than 3 years have passed since last update.

staticの使い方

Last updated at Posted at 2020-05-22

#背景
これから鬼教官より自分の面倒を見ていただけることになった。
課題を今後出されるので、そこで習ったことを記す。

#課題
消費税クラスを作成し、継承。
消費税の変数はstaticにし、消費税込みの値段を出力せよ。

#プログラム
前回からの派生版。
消費税クラスを作成・継承し、消費税込みの値段を出力するかというプログラム。
無題.png
余裕をかました結果。。。。

#学び
staticを使うときは、クラス名.フィールド名で参照することができる
無題.png

0
1
2

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