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

📄 goodsrecord.java

📁 一个简单的商品采集系统
💻 JAVA
字号:
//The definition of each record.//Here I give each record default 10 attributes import java.io.*;//Authough the private variables are instances and the Objects have implemented //the 'Serializable' it also need to do again here.public class GoodsRecord implements Serializable {		private GoodsField[] gfield;	private int count;	private final int DEFAULT_COUNT = 10;		public GoodsRecord ()	{		count = DEFAULT_COUNT;		GoodsField dgfield[] = new GoodsField[ count ];		for ( int i = 0; i < count; i++ )		   dgfield = null;		setGoodsRecord( dgfield );	}		public GoodsRecord ( GoodsField gf[] )	{		count = gf.length;		setGoodsRecord( gf );	}		public void setGoodsRecord ( GoodsField gf[] )	{		gfield = new GoodsField[ count ];//here waste so much time!!!!!Forget the initialize!		for( int i = 0; i < count; i++ )		   gfield[ i ] = gf[ i ];	}		public GoodsField[] getGoodsRecord ()	{		return gfield;	}		public String toString ()	{		String re = "";		for ( int i = 0; i < count; i++ )		   re += gfield[ i ];		return re;	}}

⌨️ 快捷键说明

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