## Java Program to Check whether a Number is Armstrong or Not

Write a java program to check Armstrong number. In this program, we are going to write a java code which checks whether an input number is Armstrong or not.

Let’s first understand what is Armstrong number?

## Java Program to Find Missing Number in Array

Write a java program to find missing number in array. Given an array of n-1 integers and these integers are in the range of 1 to n. One of the integer is missing from an array. We have to write an efficient java code to find missing number from an array. An array does not contains any duplicates.

## Binary Search in Java

Write a program to implement Binary Search in Java. In this tutorial, we are going to implement a binary search algorithm in Java. Before implementing this algorithm, let’s first understand what is binary search and how it works.

## Java Program to Find the Second Highest Number in an Array

Write a java program to find the second highest number in an array. Given an unsorted array, we have to write a java code to find the second highest number in an array.

## Find GCD of Two Numbers using Recursion – Java Code

Write a Java program to find GCD of two numbers using Recursion. Given two input integers, we have to write a code to find GCD of two numbers using recursion. For this program, I assume you are familiar with the concept of recursion. If you don’t know about recursion then check my previous post on recursion vs iteration.

## Java Program to Find the First Non-repeated Character in a String

Write a java program to find the first non-repeated character in a string.Given an input string, we have to write a java code to find the first non-repeated character in a string.

For example –

i) Input string – java
Output – j (j is the first non-repeating character in a string)

ii) Input string – web rewrite
Output – b (b is the first non-repeating character in a string)

## Java program to check anagram : Check whether Two Strings are Anagrams of each other

Write a java program to check anagram. In this programming question, we are going to write a java code to check whether two strings are anagrams of each other.

Let’s first understand what is an anagram? and how we are going to solve this problem.

## What is an Anagram?

Two strings are said to be anagrams of each other if it contains the same characters, only the order of characters in both the strings is different. In other words, both strings must contain the same exact letters in the same exact frequency.

## Java Program to Check Prime Number

Write a Java program to check prime number. Given an input integer, We have to write an efficient code to check whether a number is prime or not.

Before writing a program, let’s quickly understand what is a prime number.

### Prime Number

A prime number is a number that is greater than 1 and it has no positive divisors other than 1 and itself.

For example – 3, 13, 7  is a prime number, as it’s divisible by 1 and itself. Similarly, 29, 19 etc. are also prime numbers.

6 is not a prime number as it’s divisible by 1, 2, 3 and 6.

2 is the only even prime number.

## Program to Print 1 to 100 Numbers without using Loop

Write a program to print 1 to 100 numbers without using loop. Using loop, (for and while loop) we can easily solve this problem. Think for a moment how do you solve this problem without using a loop. We can solve this problem using recursion.