I got this error while trying to compile the below code. I would like to know what is I have done wrong.
unreported exception java.sql.SQLException; must be caugh
Always try to get help from your IDE. IDEs can often fix the error automatically. Press alt+enter in IntelliJ IDEA or ctrl+1 in Eclipse and choose to fix the error.