gpt4 book ai didi

java - 语法错误 : insert } to complete ClassBody - Eclipse

转载 作者:行者123 更新时间:2023-11-30 06:21:37 25 4
gpt4 key购买 nike

<分区>

我不明白为什么编译器会给我以下错误:

Syntax error: insert } to complete ClassBody

这是我的代码:

package sau.se.extractor.excel;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;

import java.io.File;
import java.io.IOException;

public class ExcelHandler {

public ExcelHandler() {
};
public void printExcelContent() {
Workbook wrk1 = null;
try {
wrk1 = Workbook.getWorkbook(new File(
"C:/Users/Houssem/Downloads/st.xls"));
} catch (BiffException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Sheet sheet1 = wrk1.getSheet(0);
Cell colArow1 = sheet1.getCell(0, 0);
Cell colBrow1 = sheet1.getCell(1, 0);
Cell colArow2 = sheet1.getCell(0, 1);
String str_colArow1 = colArow1.getContents();
String str_colBrow1 = colBrow1.getContents();
String str_colArow2 = colArow2.getContents();
System.out.println("Contents of cell Col A Row 1: \"" + str_colArow1
+ "\"");
System.out.println("Contents of cell Col B Row 1: \"" + str_colBrow1
+ "\"");
System.out.println("Contents of cell Col A Row 2: \"" + str_colArow2
+ "\"");
};
}

任何帮助将不胜感激

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com