listing9-01_imageloader.java

来自「着几乎所有智能机厂商都将有自己配套的App Store,甚至并非智能手机制造商的」· Java 代码 · 共 19 行

JAVA
19
字号
// Use the //#debug directive for logging statements in your application:

public Image getImage( String url ) {
	// try to get the image from the Hashtable cache:
	Image image = (Image) this.cache.get( url );
	if (image == null) {
		try {
			image = Image.createImage( url );
			this.cache.put( url, image );
			//#debug
			System.out.println("Loaded image [" + url + "]" );
		} catch (IOException e) {
			//#debug error
			System.out.println("Unable to load image [" + url + "]" + e );
		}
	}
	return image;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?