Debugging in Eclipse

What is Debugging? Debugging of the code helps us to understand execution of the program line by line. In debugging we can see what is value of variables after each line which can help us understand logic of code and identify errors or bugs. Debugging can be done manually using pen and paper or by … Read more

Format code in Eclipse

While coding we have to deal with many loops and if conditions. Due to this, we forget to maintain proper spacing between lines and character. As result the code becomes difficult to read for some other person. So instead of organizing/formatting the code manually in Eclipse we can format the code on a single click. … Read more

Common Terms used in IT Industry that Everyone should know

“John, Can you deploy Branch 675 on UAT environment”. If John was a fresher then he would understand nothing in the above instruction given to him by senior. When we join any industry as a fresher then the most common problem we face is that we are not aware of the common terminologies/jargon used for … Read more

Binary Search in Java

Binary search is an optimized algorithm to perform searching operation. It follows Divide and Conquer approach for searching. Pre-condition of Binary search : To perform Binary search the array should be sorted in ascending or descending order. Logic of Binary Search Let us consider array is sorted in ascending order. Now we compare the element … Read more

Escape Sequence in Java

Escape sequence is a character which is preceded by the backslash (\). Compiler has special meaning for escape sequences. Use of Escape Sequences Sometimes we may need to print some text within double quotes or we may need insert a new line in between texts. So these escape sequences were introduced to perform these special … Read more

Value of PI in Java

PI value in mathematics is a very important value used in number of formulas. In java value of PI can be obtained through Math class of java.lang package. Math.PI is a double constant whose value = 3.141592653589793 Let us look at a program to calculate area of circle using Math.PI Output

Selection Sorting in Java

In selection sorting each element is compared with all the following elements of the array. If the element is greater than any following element then swapping is done. After the first cycle we obtain the smallest element at the starting. Now in the second cycle, second element is compared with all following elements to obtain … Read more