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

Bubble Sorting in Java

Bubble sorting and Linear sorting are the easiest methods of sorting. Also they are the least optimized sorting algorithms. First we are going to look at bubble sorting in java. In Bubble sort each element is compared with its next element, if the element is greater than the next element then they are swapped. This … Read more

Sorting in Java

Sorting is the process through which elements can be arranged in ascending or descending order. Sorting can be done on numbers, strings etc. In Java inbuilt functions are also available to directly sort the series. These inbuilt functions are provided by Collections framework in Java. Example :- Unsorted series = 24, 20, 100, 203, 1, … Read more

Create a new Java project and program in Eclipse

In previous post we saw how to download eclipse and create a new workspace. Now let us see how to create a new Java project, program and run the program in Eclipse. Steps to create and run Java program : Step 1 : After eclipse has opened, a welcome screen will appear. You can explore … Read more

Right way to debug code using pen and paper

Anyone who is starting to code, the most difficult thing they face is to understand others code. If the code has 2-3 nested loops then even an experienced persons face a lot of problem. Understanding someone else’s code or code present on internet is very frustrating and takes a lot of time. So my advice … Read more