DEV Community

Faizan Firdousi
Faizan Firdousi

Posted on

Day 1 of #100DaysOfJavaBackend

I learned about:

๐—˜๐˜…๐—ฐ๐—ฒ๐—ฝ๐˜๐—ถ๐—ผ๐—ป ๐—›๐—ฎ๐—ป๐—ฑ๐—น๐—ถ๐—ป๐—ด:
-Types of exceptions: checked and unchecked.
-How try-catch works, along with Exception classes and their hierarchy (see image).
-How to create your own exceptions using throw and how to use throws in a method.

๐—๐——๐—•๐—–:
I gained an understanding of how JDBC connects Java to databases and the code required to make this happen. I learned to:
-Connect to a database using a URL and password as input to the Connection interface, and run queries while storing the results in an instance of ResultSet.
-Iterate through the ResultSet object using a while loop, extracting data for each row with methods like getInt() and getString().

Image description
Image descriptionToday,
-Handle SQL exceptions in a try-catch block, which may arise from syntax errors in Java or in SQL queries.

Top comments (0)