Java Programs Examples

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

Basic

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

 

Loop

Calculate Power of Number

Armstrong Number

Reverse a Number

Fibonacci Series

Palindrome Number

Prime Number

Factorial of Number

Pascal Triangle

 

Array

Insert Element in Array at Specified Position

Find Largest Number in Array Using Recursion

 

Matrix

Matrix Addition

Matrix Multiplication

Matrix Inverse

 

String

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

 

Collections

Sort ArrayList of Objects

Sort ArrayList of String and Integer

 

Algorithm

Caesar Cipher

Vigenere Cipher

 

Other

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!!