- 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.
推薦閱讀
- 同步:秩序如何從混沌中涌現
- 數據分析實戰:基于EXCEL和SPSS系列工具的實踐
- 數據可視化:從小白到數據工程師的成長之路
- Google Visualization API Essentials
- 達夢數據庫編程指南
- Developing Mobile Games with Moai SDK
- Enterprise Integration with WSO2 ESB
- 大數據時代下的智能轉型進程精選(套裝共10冊)
- Dependency Injection with AngularJS
- R Object-oriented Programming
- 數據分析師養成寶典
- Hadoop 3實戰指南
- Python數據分析從小白到專家
- 數據指標體系:構建方法與應用實踐
- MySQL數據庫應用與管理