- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 114字
- 2021-06-24 14:58:05
Class variables
There are four class variables in the ControlBox class. The first two set the minimum and maximum values for the slider and are final int variables. The second two class variables are poweredOn and sliderValue. The poweredOn variable is of the Boolean type and will be used to store the state of the power. The sliderValue is an int variable and simply holds the current value of the slider:
public class ControlBox {
// Class Variables - Public / Final
public static final int SLIDER_MIN = 0;
public static final int SLIDER_MAX = 100;
// Class Variables - Private
private boolean poweredOn;
private int sliderValue;
The initial part of the ControlBox class is provided.
推薦閱讀
- 大數(shù)據(jù):規(guī)劃、實(shí)施、運(yùn)維
- Python數(shù)據(jù)分析:基于Plotly的動態(tài)可視化繪圖
- 3D計(jì)算機(jī)視覺:原理、算法及應(yīng)用
- Creating Dynamic UIs with Android Fragments(Second Edition)
- Oracle高性能自動化運(yùn)維
- 圖數(shù)據(jù)實(shí)戰(zhàn):用圖思維和圖技術(shù)解決復(fù)雜問題
- IPython Interactive Computing and Visualization Cookbook(Second Edition)
- 實(shí)用數(shù)據(jù)結(jié)構(gòu)
- SQL Server 2012實(shí)施與管理實(shí)戰(zhàn)指南
- MySQL數(shù)據(jù)庫技術(shù)與應(yīng)用
- 大數(shù)據(jù)技術(shù)原理與應(yīng)用:概念、存儲、處理、分析與應(yīng)用
- Swift Functional Programming(Second Edition)
- 數(shù)字化轉(zhuǎn)型實(shí)踐:構(gòu)建云原生大數(shù)據(jù)平臺
- 大數(shù)據(jù)計(jì)算系統(tǒng)原理、技術(shù)與應(yīng)用
- Python金融數(shù)據(jù)挖掘與分析實(shí)戰(zhàn)