97 Things Every Programmer Should Know

97 Things Every Programmer Should Know

97 Things Every Programmer Should Know 97 Things Every Programmer Should Know is a collective wisdom from the experts in the software industry. The Author Kevlin Henney (an independent consultant, trainer and Author) has tapped…

Create an ArrayList of n Copies using Collections

Problem Statement: How to Create an ArrayList of n Copies using Collections?   Description: Collections.nCopies – Returns an immutable list consisting of specified number of copies of the specified “TECHNOSTIXS” object. The newly allocated data object is tiny (it contains…

Create an ArrayList using an Enumeration from a vector

Problem Statement: How to Create an ArrayList using an Enumeration from a vector?   Description: Step1: Constructs an empty vector studentVector  so that its internal data array has size Step2:  Appends the specified element- Student Names to the end of…

Copy Elements from one Java Vector to another Java Vector

Copy Elements from one Java Vector to another Java Vector

Problem Statement: How to Copy Elements from one Java Vector to another Java Vector?   Description: Step1:  Constructs an empty list with an initial capacity of ten. Step2: Constructs an empty vector so that its internal data array has size Step3:…

Copy Elements from Java ArrayList to other Java ArrayList

Copy Elements from Java ArrayList to other Java ArrayList

Problem Statement: How to Copy Elements from Java ArrayList to other Java ArrayList? Description: Step1:  Constructs an empty list studentList1 with an initial capacity of ten. Step2:  Constructs an empty list studentList2 with an initial capacity of ten. Step3:  Use  Collections.copy(studentList2, studentList1); Copies…

Copy Elements from Java ArrayList to Java Vector Example

Problem Statement: How to Copy Elements from Java ArrayList to Java Vector ?   Description: Step1:  Constructs an empty list with an initial capacity of ten. Step2: Constructs an empty vector so that its internal data array has size Step3:  Use…

Configure SQL Developer with MySQL

Configure SQL Developer with MySQL Do you know that we can use SQL Developer to connect to non-Oracle databases like MySQL too. As a result this makes SQL developer a handy tool to use it as a…

Reasons for Defect Leakage

What is the reasons for Defect Leakage? Negligence Lack of discipline Do not know what to do Lack of domain knowledge Skills Do not care about any process – will do my way Jumping into coding without think / understanding the…

Java Code Refactoring Tasks

Code Smells – Java Code Refactoring Tasks Insufficient Tests How many tests should be in a test suite? Unfortunately, the metric many programmers use is “That seems like enough.” A test suite should test everything that could possibly…

Get Total or Free Disk Space In JavaIO

Get Total or Free Disk Space In JavaIO   Problem Statement: How to Get Total or Free Disk Space In JavaIO? Description: We can get the total or free disk space using  java.io.File.getTotalSpace(),  java.io.File.getUsableSpace(),  java.io.File.getFreeSpace() The java.io.File.getTotalSpace() returns the number…