📄 number.java
字号:
// file: Number.java//// import java libraries//import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.event.*;import java.util.*;public class Number { // --------------------------------------------------- // // declare class member data // // --------------------------------------------------- // Number value of the object // private int value = 0; // --------------------------------------------------- // // declare class constructors // // --------------------------------------------------- // method: Number // // arguments: // int value: value of the object // // returns : none // // class default constructor // public Number() { // set the default value of the object // this.value = 0; } // method: Number // // arguments: // int value: value of the object // // returns : none // // constructor that sets the value of the object // public Number(int value) { // set the value of the object // this.value = value; } // --------------------------------------------------- // // declare class methods // // --------------------------------------------------- // method: getValue // // arguments: none // returns : value of the object // // returns the value contained in the object // public int getValue() { // return the value of the object // return value; } // method: setValue // // arguments: // int value: value for the object // // returns : none // // sets the value contained in the object // public void setValue(int value) { // return the value of the object // this.value = value; }}// // end of file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -