zParacha.com
Effective Programming Tips
    • Home
    • Programming
    • Java
    • Algorithms
    • Javascript
    • About
    • Privacy Policy

    Insertion Sort Implementation in Java

    Insertion sort is a simple algorithm. Insertion sort logic works as follows: To insert an element in an already existing set, we make room for the new item by moving larger items one position to the right. Then insert the new item at the newly available position. The algorithm most often used to sort cards in […]

    Selection Sort Implementation in Java

    Selection sort is one of the simplest sorting algorithms. It is easy to implement but it is not very efficient. The algorithm divides the input list into two parts: the sublist of items already sorted, which is built up from left to right at the front (left) of the list, and the sublist of items […]

    Calculate Height of any Tree in Java (Non-Binary Tree)

    Computing height of a tree in Computer Science is very common. Most of the examples and online discussions talk about computing the height of a Binary Tree. The example method I am sharing can be used to compute the height of any tree. So even if you have a non-Binary tree, you can use this method […]

    Easiest Way to calculate elapsed time in Java

    Quite often in our day to day programming, we need to compute how long does a specific portion of the code takes to complete. For e.g; you might want to check how long does a method take to complete.  In Java, the simplest way to accomplish this is to use System.nanoTime() method. Following example shows […]

    Java Regular Expression to Validate Social Security Number (SSN)

    Here is a utility method to check if a given String is a valid Social Security number using Java Regular Expression. 

    Java Regular Expression to check if a String is a number

    Here is another method from my String utility class. This method uses a regular expression to check if a String is a numeric value. Look at the code, then read through the explanation that follows

    How to delete Workspace from Eclipse Launcher Selection

    Launch Eclipse Click on Recent Workspaces Eclipse will list all previously used workspaces Right click on the workspace name that you want to remove Click on Remove from Launcher Selection text. This will remove the workspace from the drop-down list

    How to generate random alpha numeric String in Java

    Following code is an example of generating a random alpha-numeric string using Java Random class. It is designed to generate random String of varying length based on the input parameter.

    Java Scanner class not reading correctly after nextInt() or nextDouble method call

    Scanner is a utility class that provides methods to read command-line input. It is a very useful class, but you need to be aware of its unexpected behavior while reading numeric inputs. Consider following example.

    How to compare Strings in Java

    One of the most common bugs I’ve seen in Java programs in the use of == operator to compare two String objects. Most of the times the result may be accurate but it is not always guaranteed. We need to understand the difference between == and the Object.equals method.

    1 2 3 4 5 >»

    Recent Posts

    • Insertion Sort Implementation in Java
    • Selection Sort Implementation in Java
    • Calculate Height of any Tree in Java (Non-Binary Tree)
    • Easiest Way to calculate elapsed time in Java
    • Java Regular Expression to Validate Social Security Number (SSN)

    Categories

    • Ajax
    • Algorithms
    • Best Sites
    • Best Software
    • Blogging
    • Cricket
    • CSS
    • Featured
    • Images
    • Java
    • Javascript
    • Most Popular Posts
    • Offbeat
    • Pakistan
    • Programming
    • Spring
    • Top Stories
    • Twitter
    • Uncategorized
    • Web Development

    Tags

    2007 series Alexa Alpha-nuermic AlphaNumeric Array Blogging BubbleSort Bubble Sort cascading_style_sheet Cricket CSS Eclipse Entrecard getDouble() getInt() Gmail iBlogCup IDE India vs Pak India vs Pakistan Java Java IDE Javascript largest and smallest numbers Largest Number Pak vs India plugin Random Recursion RegEx Reg Ex RegRex Regular Expression Scaner Scanner smallest number Sort SSN String system.in tools Twitter web development tools WordPress workspace

    Back to Top

    © zParacha.com 2022
    Powered by WordPress • Themify WordPress Themes
     

    Loading Comments...