⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toto.java

📁 一个短小但实用的junit测试示例,适合初学者
💻 JAVA
字号:

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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -