➤ How to Code a Game

➤ Array Programs in Java

➤ Java Inline Thread Creation

➤ Java Custom Exception

➤ Hibernate vs JDBC

➤ Object Relational Mapping

➤ Check Oracle Database Size

➤ Check Oracle Database Version

➤ Generation of Computers

➤ XML Advantages & Disadvantages

➤ Advantages of Open Source Software

➤ How to read and display .class file version

➤ Java Program Without Using User-defined Class

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.

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

## Java Basic Programs

The Java basics will teach about variables, data types, how to write basic Java programs, 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.

- Java Hello World program
- Java Addition Program
- Average of Two Numbers
- Average of 3 Numbers
- Calculate Simple Interest
- Calculate Compound Interest
- Display ASCII value in Java

- Calculate Area of Circle in Java
- Find Area of Rectangle in Java
- Find the Area of Triangle in Java
- Swapping two Numbers in Java
- Distance Between 2 Points in Java
- Simple Mortgage Calculator in Java

## 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.

- Check Even number in Java
- Check Odd Number in Java
- Java code to Check Even Odd
- Find the Greatest of 3 numbers
- How to Find exponents in Java
- Students Grades using Switch Case

- Leap year program in Java
- Print Multiplication table
- Find Reverse of a number
- Find Factors of a number
- LCM of two numbers in Java

- HCF of two numbers in Java
- Roots of a quadratic equation
- Square Root of a Number
- Perfect Square Program
- Print 1 to 100 Without Loop

- Simple Calculator Program
- BMI (Body Mass Index) Calculator
- Electric Bill Java Program
- Factorial of a Number in Java
- Factorial Using Recursion in Java

**Java Programs to find Sum**

- Sum of digits of a number in Java
- The sum of N Natural numbers
- The sum of even digits in a number
- Sum of odd digits in a number
- Sum of first & last digit of a number
- The Sum of Digits Until Single Digit

**Series Program in Java**

**Conversion based on Flow Control**

**Pattern Programs in Java**

**Java Number Programs**

## 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**

- Find Length of Array in Java
- Different ways to Print Array
- Find the Sum of Array in Java
- Average in Java using Array
- Sum of Two Arrays Elements
- Compare Two Arrays in Java

- Copy Array in Java
- Merge Two Arrays in Java
- Merge Two Sorted Arrays
- Largest Number in Array
- Smallest Number in Array

- 2nd Largest Number in Array
- How to Sort an Array in Java
- Reverse an Array in Java
- GCD of N Numbers in Java
- Linear Search in Java
- Binary Search Program in Java

- Remove Duplicates From Array
- Insert Element at Specific Position
- Add Element to Array in Java
- Remove Element From Array in Java
- Count Repeated Elements in Array

### Multi-dimensional array and Matrix Programs in Java

- Print 2D array in Java
- Program to Print 3×3 Matrix
- Sum of matrix elements in Java
- Sum of Diagonal Elements of Matrix
- Row sum and Column sum of Matrix

- Matrix Addition in Java
- Subtraction of two matrices in Java
- Transpose of a Matrix in Java
- Matrix Multiplication in Java
- Menu-driven program for Matrix operations

## Java Programming Examples on String

**Number programs using String**

## Collection Java Programming Examples

**String Programs with the help of Collection**

**Other Problems**

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