## find duplicate in array java

finding duplicates in array of int using loop finding duplicates in array of Integer using set

## find second largest number in array java

java program to find second largest number in array using Arrays.sort() java program to find second largest number in array using Collections.sort()

## read a text file and list each word with number of occurrence

java program to read a text file and list each word with number of occurrence

## java split string by words

A java code to split string by words fro given sentences using StringTokenizer class

## java program to check armstrong number

Armstrong number is a number which is the sum of its own digits each raised to the power of the number of digits, for example if “abc” is a Armstrong number then a^3+b^3+c^3=abc or if “ab” is Armstrong than a^2+b^2=ab. java program to check Armstrong numbers within a given range of numbers, the below program […]

## java program for string anagram

anagram is a word or name formed by rearranging the letters of another word, for example “silent” is made from “listen” java program to check two strings are anagram or not using char array and Arrays.toString() java program to check two strings are anagram or not using for loop

## palindrome program in java

String palindrome is a string which reads same backwards and forwards for example “madam” the word madam reads same from both way java palindrome program using character array

## java program to find sum of n numbers

sum of n sequential number (1,2,3…..n)is sum=n*(n+1)/2

## java program to find missing number in an array

There is a mathematical formula to find the sum of numbers where the numbers are in sequence and starts from 1. So according to the mathematical formula for numbers ranging (1,2,3…n) we can find the sum of numbers as sum=n*(n+1)/2. for example sum of 1,2,3,4,5 is sum=5*(5+1)/2 =15, same formula is used to find the […]

## java program to count number of digits in a string

java program to find the count of integer values from the given string using Character.isDigit() method.for example given string as input : sb7ak9lh8fg45 output : 5