Posts

Showing posts from May, 2017

Error Handling in Java

You cannot afford to have an application that stops working or crashes if the requested file is not present on the disk. Traditionally, programmers used the return values of methods to detect error that occurred at run time. Error handling becomes a necessity when developing applications that need to take care of unexpected situations. The unexpected situations that may occur during program execution are: Running out of memory Resource allocation errors Inability to find files Problems in the network connectivity Exception An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions during the execution of a program. Exception handling code can perform the following tasks. Find the problem(Hit the exception) Inform the error has occurred(Throw exception) Receive the error information(Catch the exception) Take corrective actions(Exception handling) Inside the standard package Java.lang, java defi...

V-Model

Image
V- model means Verification and Validation model. Just like the  waterfall model , the V-Shaped life cycle is a sequential path of execution of processes. Each phase must be completed before the next phase begins.  V-Model  is one of the  many software development models . Testing of the product is planned in parallel with a corresponding phase of development in  V-model . Diagram of V-model: The various phases of the V-model are as follows: Requirements like BRS and SRS begin the life cycle model just like the waterfall model. But, in this model before development is started, a system test plan is created.  The test plan focuses on meeting the functionality specified in the requirements gathering. The high-level design (HLD) phase focuses on system architecture and design. It provide overview of solution, platform, system, product and service/process. An integration test plan is created in this ph...

Static Code Analysis using FindBugs

Image
It is a method of computer program debugging that is done by examining the code without executing the program. Introduction to Tool FindBugs, a free software program which uses static analysis to look for bugs in Java code. It   requires JRE (or JDK) 1.7.0 or later to run.  However, it can analyze programs compiled for any version of Java, from 1.0 to 1.8. Download and Configuration Details FindBugs can be downloaded in this link ( http://findbugs.sourceforge.net/downloads.html ). The FindBugs plugin should be installed into the Netbeans IDE as follows, Choose Source > Inspect from the main IDE's menu. In the Inspect dialog box, click Install. In the Installer dialog box, click Next to proceed with the installation.   Review the license agreement, select the license agreement option, and click Install. When the installation is complete, click Finish. Finding Potential Problems in Java Code with FindBugs The  FindBugs ...