➤ 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
- Golden Ratio Java Program
Java Programs to find Sum
Series Program in Java
Conversion based on Flow Control
Pattern Programs in Java
Java Number Programs
- Sunny Number in Java
- Automorphic Number
- Krishnamurthy Number
- Evil Number in Java
- Strong Number in Java
- Disarium Number Java
- Neon Number in Java
- Pronic Number in Java
- Duck Number in Java
- Harshad Number Java
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 the LCM of an Array in Java
- Linear Search in Java
- Binary Search Program in Java
- Remove Duplicates From the Array
- Insert Element at Specific Position
- Add Element to Array in Java
- Remove Element From Array in Java
- Count Repeated Elements in an Array
- How To Reduce The Size Of An Array In Java
- Find Odd Occurrence Number Array in Java
- Java Primitive Array To Wrapper Array
- Java Array of Random Numbers
- Find the Median of an 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 using Scanner
- How to Find Length of String in Java
- Length of String Without length()
- How to Iterate through String Java
- Java For Each Character In String
- 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
- Split String By Line in Java
- Compare Strings Alphabetically Java
- Put Quotes in a String Java
- Java String Parsestring
- How to Check if String is Empty Java
String Programs on Replace/Remove
Conversion of/to String Programs in Java
String Array Programs
Number programs using String
Others/Games Programs using String
Java Programming Examples on Collection
- Java Program for Shopping Bill
- How to Print Arraylist Without Brackets Java
- Unique Digits Count in Java
- Remove Duplicates From ArrayList Java
- Sort ArrayList in Java
- Append To ArrayList 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
- How To Find Repeated Characters In A String In Java
- Cast Object to List String in Java
- Java Convert Object List To String List
- Java Convert String List To Array
- Java String Array to String List
- Convert Map to String Java
- Convert String to Map Java
- Join List Of Strings in Java
Collection & Array Programs
Other Problems
Recent
- Java.lang.integer Cannot Be Cast To Java.lang.boolean
- Convert Integer To Byte In Java
- Compare Integer And Int Java
- Java Convert Integer To Short and Vice-Versa
- How To Reverse an Integer in Java
- Java Integer compareTo() Method
- Integer.compare() in Java
- How To Compare String And Integer In Java
- Print Byte Array in Java
- Convert Integer To Char in Java
- Java Integer decode() Method
- Convert Byte Array To Integer In Java
- Int vs Integer in Java
- Int to Integer in Java
- Convert Integer To Int in Java
- Integer To Double in Java
- Java Integer getInteger() Method
- Java Integer hashCode() Method
- Java List Integer To Int Array
- Integer To Long in Java
- Java Integer parseInt() Method
- Long Data Type In Java
- Short Data Type in Java
Others
- Junit & Mockito with Spring Boot Rest Application
- FilenameUtils.getExtension() Example
- Get File Extension in Java
- Sophisticated Modeling Software is Helping International Researchers
- Select the Term that Best Describes Automated Attack Software
- Which of the Following Software Programs Provide for Email Communications?
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.