如何用Java編寫外部系統(tǒng)接口實現(xiàn)文件導入?
// 定義接口import java.io.FileOutputStream;public interface OperateFile {// 導入文件public boolean importFile(String path,String name);// 導出文件public FileOutputStream exportFile(String path);}//..........................................// 實現(xiàn)子類import java.io.FileOutputStream;public class OperateFileImp implements OperateFile{public boolean importFile(String path, String name) {// File file = new File(path,name)....// 在此實現(xiàn)方法,作業(yè)嘛…return false;