toto.java
来自「一个短小但实用的junit测试示例,适合初学者」· Java 代码 · 共 26 行
JAVA
26 行
public class Toto {
private int[] array;
public Toto(int size) {
array= new int[size];
}
public String getHelloWorld() {
return "Hello World";
}
public boolean getTruth() {
return true;
}
public void setElement(int position, int value) throws ArrayIndexOutOfBoundsException {
array[position] = value;
}
public int getElement(int position) throws ArrayIndexOutOfBoundsException {
//synchronized(Toto.class);
return array[position];
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?