Please visit our Java Tutorial section to learn Java Programming with examples.
Simple Java Programs
- Hello World Program
- Add Two Numbers
- Compound Interest
- Check Number is Divisible by 5 and 11
- Cube of a Number
- Even Numbers from 1 to N
- GCD of a Number
- Largest of Two Numbers
- Largest of Three Numbers
- LCM of a Number
- Multiplication Table
- Odd Numbers from 1 to N
- Odd Even Program
- Positive or Negative Number
- Power of a Number
- Profit or Loss
- Print 1 to 100 without using Loops
- Roots of a Quadratic Equation
- Square of a Number
- Square Root of a Number
- Simple Interest
- Sum of Even Numbers
- Sum of Odd Numbers
- Student Grade
- Sum of Even and Odd Numbers
- Total Average and Percentage of Five Subjects
Character Programs in Java
Area Programs
The following are the list of java programs to find
- Area of Circle
- Area Of Triangle
- Find Area Of Trapezoid
- Area of Equilateral Triangle
- Area of Rectangle
- Find Area of a Right Angled Triangle
Volume and Surface Area Programs
The following are the Java programs to find the Surface area and Volume of the given data.
- Volume and Surface Area of Sphere
- Volume and Surface Area of a Cylinder
- Find Volume and Surface Area of Cube
- Volume and Surface Area of Cuboid
- Volume and Surface Area of Cone
Number Programs
- Armstrong Number
- Count Number of Digits in a Number
- Electricity Bill Program
- Factors of a Number
- Factorial Program in Java
- Fibonacci Series in Java
- First Digit of a Number
- First and Last Digit of a Number
- Generic Root of a Number
- Last Digit of a Number
- Natural Numbers from 1 to N
- Natural Numbers in Reverse Order
- Perfect Number Program
- Palindrome Program
- Prime Number or Not
- Prime Numbers from 1 to N
- Sum of Prime Numbers from 1 to N
- Reverse a Number
- Strong Number
- Sum of Digits in a Number
- Sum of Natural Numbers from 1 to N
- Swap Two Numbers
Java String Programs
- Print Characters in a String
- ASCII values of Characters in a String
- Concat Strings
- Convert Lowercase to Uppercase
- Convert Uppercase to Lowercase
- Count Total Characters in a String
- Count Total Words in a String
- Counting Alphabets Digits and Special Characters in a String
- Count Vowels and Consonants in a String
- Count Total Occurrence of Character in a String
- Find All Occurrences of a Character in a String
- Find First Character Occurrence in a String
- Finding Last Character Occurrence in a String
- Find Maximum Occurring Character in a String
- Find Minimum Occurring Character in a String
- Frequency of each Character in a String
- Palindrome String
- Print First and Last Character in a String
- Remove All Occurrences of a Character in a String
- Remove First and Last Character in a String
- Remove First Character Occurrence in a String
- Removing Last Character Occurrence in a String
- Replace First Character Occurrence in a String
- Replace Last Character Occurrence in a String
- String Reverse
- Toggle All Characters in a String
Java Conversion programs
- Convert Double to String
- Convert Int to Double
- Program to Convert Int to Long
- Convert Float to String
- Convert String to Double
- Program to Convert String to Float
- Convert String to Long
Date Programs
Java Array Programs
- Print Array Elements
- Arithmetic Operations on Array
- Copy an Array to another
- Count Even Numbers in an Array
- Count Even and Odd Numbers in an Array
- Counting Odd Numbers in an Array
- Count Positive Array Numbers
- Count Negative Array Numbers
- Counting Positive and Negative Numbers in an Array
- Count Array Duplicates
- Delete Array Duplicates
- Largest Array Number
- Largest and Smallest Array Number
- Print Negative Array Numbers
- Print Positive Array Numbers
- Put Positive and Negative Numbers in Separate Array
- Second Largest Array Number
- Smallest Array Number
- Sort Array Elements in Ascending Order
- Sort Array Elements in Descending Order
- Sum of All Elements in an Array
- Sum of Even Numbers in an Array
- Summing Even and Odd Numbers in an Array
- Sum of Odd Numbers in an Array
- Swap Two Array without using Temp Variable
- Unique Array Items
Java Matrix Programs
- Print Matrix Items
- Arithmetic operations on Matrix
- Add Two Matrices
- Check Two Matrices are Equal
- Determinant of a Matrix
- Identity Matrix
- Interchange Matrix Diagonals
- Lower Triangle of a Matrix
- Multiply two Matrices
- Scalar Matrix Multiplication
- Sparse Matrix
- Subtract two Matrices
- Sum of the Matrix Lower Triangle
- Sum of the Matrix Upper Triangle
- Summing of Matrix Opposite Diagonal
- Sum of Matrix Diagonal
- Sum of each Matrix Column
- Summing of each Matrix Row
- Sum of Matrix Rows and Column
- Symmetric Matrix
- Transpose Matrix
- Upper Triangle of a Matrix