Top 100+ Java Programming Examples With Output

Java Programming Examples With Output | Learn Java Programming Language through examples. Develop java basic programs to understand the basic concepts of Java. These are the basic Java program examples with output. After learning the procedure to develop the program try to develop it on your own and then compare the code given on the website. This page contains frequently, unique, and popular Java programs. For all Java programs visit here:- Java Program List

Quick Navigation:- Basic, Flow Control (sum, conversion, series, pattern, number), Array, String, Collection.

Java Basic Programs

The Java basics will teach about variables, data types, how to write basic Java programs, and how to read input values and display them. How to perform basic arithmetic operations in Java, and how to solve basic formula-based problems using Java programming language.

  1. Java Hello World program
  2. Java Addition Program
  3. Average of Two Numbers
  4. Total & Average of 3 Subjects
  5. Calculate Simple Interest
  1. Calculate Compound Interest
  2. Display ASCII value in Java
  3. Calculate Area of Circle in Java
  4. Find Area of Rectangle in Java
  5. Find the Area of Triangle in Java
  1. Swapping two Numbers in Java
  2. Distance Between 2 Points in Java
  3. Simple Mortgage Calculator in Java
  4. Miles to Kilometers Java Program
  5. Unit Conversion Java Program

Java Programming Examples on Flow Control

Java flow control programs are based on conditional control statements (if, if-else and switch-case), loop control statements (while loop, do-while loop, for-loop), and Jump control statements (continue, and break). This section contains multiple Java programs. Some of them are formula-based programs, programs on different types of numbers, different types of printing patterns, flow-control-based conversion programs, and e.t.c.

Array Programs in Java

The array in Java is a referenced data type used to create a fixed number of multiple variables or objects of the same type to store multiple values of similar type in contiguous memory locations with a single variable name. =➤ See all Array Programs in Java

  1. Find Length of Array in Java
  2. Different ways to Print Array
  3. Find the Sum of Array in Java
  4. Average in Java using Array
  5. Sum of Two Arrays Elements
  1. Compare Two Arrays in Java
  2. Copy Array in Java
  3. Merge Two Arrays in Java
  4. Merge Two Sorted Arrays
  5. Largest Number in Array
  1. Smallest Number in Array
  2. 2nd Largest Number in Array
  3. How to Sort an Array in Java
  4. Reverse an Array in Java
  5. GCD of N Numbers in Java
  1. Find the LCM of an Array in Java
  2. Linear Search in Java
  3. Binary Search Program in Java
  4. Remove Duplicates From the Array
  5. Insert Element at Specific Position
  1. Add Element to Array in Java
  2. Remove Element From Array in Java
  3. Count Repeated Elements in an Array
  4. How To Reduce The Size Of An Array In Java
  5. Find Odd Occurrence Number Array in Java
  1. Java Primitive Array To Wrapper Array
  2. Java Array of Random Numbers
  3. Find the Median of an Array in Java

Multi-dimensional array and Matrix Programs in Java

  1. Print 2D array in Java
  2. Program to Print 3×3 Matrix 
  3. Sum of matrix elements in Java
  4. Sum of Diagonal Elements of Matrix
  5. Row sum and Column sum of Matrix
  1. Fill 2D Array With Random Numbers
  2. Sort 2D Array In Java
  3. Java Magic Square 2D Array
  4. Java Count Occurrences in 2D Array
  5. How to Find Minimum Value in 2D Array Java
  1. Matrix Addition in Java
  2. Subtraction of two matrices in Java 
  3. Transpose of a Matrix in Java 
  4. Matrix Multiplication in Java
  5. Menu-driven program for Matrix operations

Simple Games using Array

  1. Java Lottery Program Array
  2. Java 2d Array Tic Tac Toe Program

Java Programming Examples on String

String Programs on Replace/Remove

Conversion of/to String Programs in Java

String Array Programs

Number programs using String

  1. Unique Number
  2. Fascinating Number
  3. ISBN Number

Others/Games Programs using String

  1. Hidden Word Java Program
  2. Java Secret Message Program

Java Programming Examples on Collection

  1. Java Program for Shopping Bill
  2. How to Print Arraylist Without Brackets Java
  3. Unique Digits Count in Java
  4. Remove Duplicates From ArrayList Java
  5. Sort ArrayList in Java
  6. Append To ArrayList Java
  7. Anagram Program In Java Using List

String Programs with the help of Collection

  1. Print Vowels & Consonants in String
  2. Convert Comma Separated String to List Java
  3. Convert Pipe Delimited String to List Java
  4. How To Find Repeated Characters In A String In Java
  5. Cast Object to List String in Java
  6. Java Convert Object List To String List
  1. Java Convert String List To Array
  2. Java String Array to String List
  3. Convert Map to String Java
  4. Convert String to Map Java
  5. Join List Of Strings in Java

Collection & Array Programs

  1. Convert List Of List To 2d Array Java
  2. Java Array To LinkedList
  3. Convert ArrayList to Byte Array Java

Other Problems

  1. City Library Fine Report in Java
  2. Drivers License Exam Java Program




More Programs are coming soon, keep visiting. Subscribe to our newsletter and follow us on Facebook, Instagram, and Twitter to receive the latest tutorial and programs to improve your programming skills.

Keep in Touch