📄 hasx.java
字号:
package examples.inheritance;
/** A Java superclass to demonstrate inheritance
* concepts
*/
public class HasX {
private int x;
/** Method to set the value of the object
* @param inputX The field's new value
*/
public void setX( int inputX ) {
x = inputX;
}
/** Method to get the value of the object
* @return The value of the field
*/
public int getX() {
return x;
}
/** Method to write X to <code>System.out</code>
*/
public void showX() {
System.out.println( x );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -