➤ How to Code a Game
➤ Array Programs in Java
➤ Java Inline Thread Creation
➤ Java Custom Exception
➤ Hibernate vs JDBC
➤ Object Relational Mapping
➤ Check Oracle DB Size
➤ Check Oracle DB Version
➤ Generation of Computers
➤ XML Pros & Cons
➤ Git Analytics & Its Uses
➤ Top Skills for Cloud Professional
➤ How to Hire Best Candidates
➤ Scrum Master Roles & Work
➤ CyberSecurity in Python
➤ Protect from Cyber-Attack
➤ Solve App Development Challenges
➤ Top Chrome Extensions for Twitch Users
➤ Mistakes That Can Ruin Your Test Metric Program
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.
- Java Hello World program
- Java Addition Program
- Average of Two Numbers
- Total & Average of 3 Subjects
- 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
- Miles to Kilometers Java Program
- 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.
- Java code to Check Even Odd
- Find the Greatest of 3 numbers
- How to Find exponents in Java
- Students’ Grades using Switch Case
- Iterate digits of a number
- 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
- Find runtime of a Java Program
- Factorial of a Number in Java
Java Programs to find Sum
Series Program in Java
Conversion based on Flow Control
Pattern Programs in Java
Java Number Programs
Simple Game 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
- Find LCM of an Array 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
- How To Reduce The Size Of An Array In Java
- Find Odd Occurrence Number Array in Java
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
- Fill 2D Array With Random Numbers
- Sort 2D Array In Java
- Java Magic Square 2D Array
- Java Count Occurrences in 2D Array
- How to Find Minimum Value in 2D Array Java
- 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
Simple Games using Array
Java Programming Examples on String
- Take String Input In Java using Scanner Class
- How to Find Length of String in Java
- How to Iterate through String Java
- Sum of digits in a String
- Count No of Vowels String
- String Pattern Programs in Java
- How To Reverse a String In Java
- String Palindrome In Java
- Sort String In Java
- How to Compare Strings In Java
- Check If String Contains Uppercase & Lowercase
- Java Check If Char is Uppercase
- Check If String is Uppercase Java
- Swap Characters in String Java
- Generate Random Strings
- Java Program to Find Weight of String
- Find Second Occurrence of Character in String Java
- Find Last Occurrence of Character in String Java
- Java Replace nth Occurrence String
- Replace Last Occurrence of Character in String Java
- How to Replace Dot in Java
- How To Remove Substring From String Java
- Replace Special Characters In Java
- Java Replace String With Escape Character
- Java Remove Special Characters From String
- How To Remove Character From a String Java
- Remove Commas From String Java
- Replace Comma in String Java
- Golden Ratio Java Program
Number programs using String
String Array Programs
- Java Convert Number String to Array
- How to Iterate Through a String Array In Java?
- Convert String Array to Lowercase Java
- String Array to UpperCase Java
Others/Games Programs using String
Collection Java Programming Examples
- How to Print Arraylist Without Brackets Java
- Unique Digits Count in Java
- Java Program for Shopping Bill
- Remove Duplicates From ArrayList Java
- Sort ArrayList in Java
- Convert ArrayList to Byte Array Java
- Anagram Program In Java Using List
String Programs with the help of Collection
- Print Vowels & Consonants in String
- Convert Comma Separated String to List Java
- Convert Pipe Delimited String to List Java
Collection & Array Programs
Other Problems
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.