我的预测学生做一个项目的另一个Java代码调用Java代码performance..for我必须使用Eclipse读取Excel工作表一个数据集,我已经完成读取来自datasets..now这段Java代码,我必须调用另一个代码在这里我们使用多层感知算法predicting..can我知道如何使用功能如何从使用功能在日食
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFRow;
public class Dataset1 {
public static void main(String [] args) {
try {
InputStream input = new BufferedInputStream(new FileInputStream("D:\\sampledoc.xls"));
POIFSFileSystem fs = new POIFSFileSystem(input);
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheetAt(0);
Iterator rows = sheet.rowIterator();
while(rows.hasNext())
{
HSSFRow row = (HSSFRow) rows.next();
System.out.println("\n");
Iterator cells = row.cellIterator();
while(cells.hasNext())
{
HSSFCell cell = (HSSFCell) cells.next();
if(HSSFCell.CELL_TYPE_NUMERIC==cell.getCellType())
System.out.print(cell.getNumericCellValue()+" ");
else if(HSSFCell.CELL_TYPE_STRING==cell.getCellType())
System.out.print(cell.getStringCellValue()+" ");
else if(HSSFCell.CELL_TYPE_BOOLEAN==cell.getCellType())
System.out.print(cell.getBoolean CellValue()+" ");
else if(HSSFCell.CELL_TYPE_BLANK==cell.getCellType())
System.out.print("BLANK ");
else System.out.print("Unknown cell type");
}
}
} catch(IOException ex) {
ex.printStackTrace();
}
}
}
这是我使用读取数据集的代码来调用另一个代码,即MLP码我得到的结果成功......现在怎么使用功能
那你的意思是'另一个Java program'和'另一个Java code'? 你想调用另一个java类中的方法吗? –
我很困惑。您已经在使用遍布各处的函数调用其他代码。你究竟在哪里卡住? –