- Top 100+ Java Programming Examples With Output
- Java Basic Programs
- Java Programming Examples on Flow Control
- Array Programs in Java
- Multi-dimensional array and Matrix Programs in Java
- Java Programming Examples on String
- Java Programming Examples on Collection
- Others
- Saved searches
- Use saved searches to filter your results more quickly
- howtoprogram/Java-Examples
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
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
Java Basic Programs
- 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
- Even Number in Java
- Odd Number in Java
- Prime Number in Java
- Twin prime Number
- Magic Number in Java
- Armstrong Number
- Palindrome Number
- Perfect Number Java
- Spy Number in Java
- Tech Number in Java
- 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
- Kaprekar Number Java
- Buzz Number in Java
- Nelson Number in Java
- Special Number in Java
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
- How To Print An Array In Java In One Line
- How To Append 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
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
- Sort String In Java
- How to Compare Strings In Java
- Check If Char is Uppercase
- Check If String is Uppercase Java
- String Contains Uppercase or Lowercase
- Swap Characters in String Java
- Generate Random Strings
- Java Program to Find Weight of String
- Find the Second Occurrence of Character
- Find the Last Occurrence of Character
- 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
- How to Compare String to Enum Java
- How to Concat Int to String in Java
- New Line In Java String
- Find Repeating Pattern In String Java
- Java Set Character in String
- Appending String In Java
- Concat Strings in Java
- Java String Interpolation
String Programs on Replace/Remove
Conversion of/to String Programs in Java
String Array Programs
Java Programming Examples on 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
- 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
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.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Some Java examples about using frameworks, libraries
howtoprogram/Java-Examples
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
This small project contains examples how to convert Java object, Hashmap, List to JSON and vice versa. It also contains examples about how to work with files.
2.Book RESTful Service Examples
This RESTful ws provides API for all below sub projects
3.Simple Java REST Client Example