Exception Handling in Java

An exception is an abnormal condition that arises in a code sequence at run time. Java exception handling is managed via five keywords: try, catch, throw, throws, and finally. Workflow Program statements that you want to monitor for exceptions are contained within a try block. If an exception occurs within the try block, it is thrown. Your code can catch this exception (using catch) and handle it in some rational manner. To manually throw an exception, use Read more…

Setup Maven for Windows, Mac and Linux

Maven Maven is a build automation tool used primarily for Java projects. Consider a project consisting of 100s and 1000s of Java file. need to compile each and every .java file for .jar packing. Similarly, in the case of .ear or .war file, we need to add all the dependencies needed along with .jar files. You can see compiling and adding dependencies for 100s of files is a serious task. This is the place where Read more…

Hello World

Let’s start with a little program in java to print a line “Hello World” Line 1 public : One of Access Modifiers. It makes this piece of code visible to the world. class : A class is a blueprint from which individual objects are created. HelloWorld : Name of the class Line 2  static : static is a keyword that allows main( ) to be called without having to instantiate a particular instance of the class. void Read more…