Syntax error: insert } to complete ClassBody - Eclipse

eclipse, java

Solution

Sometimes, Eclipse doesn't properly clean up errors. You can try to clean/rebuild your project (menu: Project > Clean..), that usually does the trick.

If the error is still there, just delete it (no kidding): Select the error in the 'Problems' view and delete it (DEL key or using the context menu). Refresh or clean your project afterwards to see if the error reappears.

Problem

I don't understand why the compiler gives me the following error: ``` Syntax error: insert } to complete ClassBody ``` Here is my code: ``` 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 + "\""); }; } ``` any help will be appreciated

Original source