Blog Archives

Example Program: Search Word in Folder files and print output


To Search a word in in list of files available in Folder, you need to find the list of files first and then scan each and every for required word. Below is the sample program to find the a given

Tagged with: , , , , , , , , , , , ,
Posted in JAVA

Merge Sort Example in Java


package in.malliktalksjava; /** * @author malliktalksjava * * Sorts the given array using merge sort algorithm */ public class MergeSortExample { private int[] array; private int[] tempMergArr; private int length; /** * @param args * * main method. * Pass

Tagged with: , , , , , , , ,
Posted in JAVA

Quick Sort Example Program in Java


package in.malliktalksjava; /** * @author malliktalksjava * * Sort the given array using QuickSort Algorithm */ public class QuickSortExample { private int array[]; private int length; /** * @param args * * Main Method. Calls the sort method and print

Tagged with: , , , , , , , , ,
Posted in JAVA

Selection Sort Example Program in Java


package in.malliktalksjava; /** * @author malliktalksjava * @version 1.0 * * Below class sorts the given array using SelectionSort * mechanism and prints the output into console. */ public class SelectionSortExample { /** * @param args */ public static void

Tagged with: , , , , , , ,
Posted in JAVA

Example Program – Armstrong Number


Below sample programs finds whether the given number is an Armstrong Number or not. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example,

Tagged with: , , ,
Posted in JAVA

Example program to reverse a Number in Java


  package in.javatutorials; public class ReverseNumber { public static void main(String[] args) { System.out.println(“The reversed number is ” + reverse(1234)); } public static int reverse(int input) { int result = 0; int rem; while (input > 0) { rem =

Tagged with: , , , , , , ,
Posted in JAVA

How to find count of duplicates in a List


There are many different ways to find out the duplicates in a List or count of duplicates in a List object. Three best ways have been implemented in the below sample class. I suggest to go with 2nd sample, when

Tagged with: , , , , , ,
Posted in JAVA

Avoid nested loops using Collection Framework in Java


It is very important to have high performance for any software implemented in any programming language. And, as per truth loops plays major role in building the high performance applications. In this post, I have tried to explain how to

Tagged with: , , , , , , , , , , ,
Posted in JAVA

Replace special characters in a String using java


package in.javatutorials; /** * @author javatutorials * @since version 1.0 * * Below class replaces the special characters in a string with empty value * */ public class ReplaceSpecialCharacters { public static final String REG_EXPR = “[!\”#$%&'()*+-./:;<=>?@\\^_{|}~`,.\\[\\]]*”; /** * @param

Tagged with: , , , , , , , , ,
Posted in JAVA

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

Calendar
November 2018
M T W T F S S
« Sep    
 1234
567891011
12131415161718
19202122232425
2627282930  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 284,406 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100