错误太多
package java1;import
import
interface Product
{
int getProduceTime();
}
class Printer implements ObjectOutput , Product
{
private static final int MAX_CACHE_LINE = 0;
private Strinng [] printData= new String[MAX_CACHE_LINE];
private int dataNum =0;
public void out()
{
while(dataNum >0)
{
System.out.println("打印机打印:"+printData[0]);
System.out.println(printData,printData,0,--dataNum);
}
}
public void getData(String msg)
{
if (dataNum >=MAX_CACHE_LINE)
{
System.out.println("输出以便已满。添加失败");
}
else {
printData[dataNm++]=msg;
}
}
public int getProduceTime()
{
return 45;
}
public static void main(String [] args)
{
Output o=new Printer();
o.getData("轻量级javaEE企业应用实战");
o.getData("疯狂java义讲");
o.out();
}
}