Try-catch block   Point to remember regarding try- catch:  Whenever try block has n number of blocks, then if an exception object is created, the order of preference of catch blocks is the order in which they are present below the try block.   Consider the following scenarios: Try { ==== } Catch (exceptions e)…


Throws keyword and Constructors   Definitely, we can use throws keyword with constructors because constructors may have many numbers of statements which are proven to generate exception class objects.   Class Edemo4 { Int    I, j, k; Edemo4 (int x, int y) throws Exception { I=x; j=y; K – i/j; } } Class Test4 {…


Rules and Regulations The class name should be start with a capital letter. This is not compulsory but it is a conventional rule. Java is a case sensitive. All keywords in java are written in small letters. As a convention anything that starts with a capital letter is treated as the name of a class…