Java Programs Examples

Here I have compiled various java programs examples that will help you to improve your java programming knowledge.


Take Input from User

Addition of Two Numbers

Calculate Simple Interest

Calculate Compound Interest

Swap Two Numbers Using Third Variable

Swap Two Numbers Without Using Third Variable

Calculate Area and Circumference of Circle

Check Even or Odd Number

Find Largest of Three Numbers

Check Leap Year

Convert Decimal to Binary

Convert Binary to Decimal

Find GCD of Two Numbers Using Euclidean Algorithm



Calculate Power of Number

Armstrong Number

Reverse a Number

Fibonacci Series

Palindrome Number

Prime Number

Factorial of Number

Pascal Triangle



Insert Element in Array at Specified Position

Find Largest Number in Array Using Recursion



Matrix Addition

Matrix Multiplication

Matrix Inverse



Reverse String

Convert String to Character Array

Check String is Anagram

Split String


Sorting & Searching

Heap Sort

Bubble Sort

Binary Search

Linear Search

Bucket Sort



Sort ArrayList of Objects

Sort ArrayList of String and Integer



Caesar Cipher

Vigenere Cipher



Encode or Decode URL Parameters

Convert JSON to XML or XML to JSON

Read and Write Properties File

Convert Image to Base64 String or Base64 String to Image

Socket Programming


More programs coming soon!!