- 👋 Hi, this is lohith
- 👀 I’m interested in coding
- 🌱 I’m currently learning full java stack
Let's learn basic java programs.
Java program to calculate area of a circle
Java program to add two numbers
Java program to calculate area of rectangle
Java convert binary to decimal
System arraycopy() method in java
Convert char array to string in java
How to create directory in java
How to get current date and time in java
Java program to convert decimal number to binary
Java program to delete specified integer from an array
Java program to find IP address of a system
Java program to check even or odd number
Java program to print Floyd’s triangle
How to get last modified date of a file in java
Java program to find if given year is leap year
Java program to find transpose of a matrix
Java program to check if a number is palindrome or not
Java program to check whether string is palindrome
Java program to display pascal triangle
Java program to check whether number is prime or not
Java program to print alphabets
Java program to print multiplication table of any number
Java program to delete vowels in a given string
Random number generator in java
Java program to find simple interest
How to sort a string array in java
Sparse matrix and its representations in java
String toUpperCase() method in java
String length() method in java
Java remove character from string
Java String toCharArray() method
Java program to swap two numbers
Java catch multiple exceptions and rethrow exception
Preface to java virtual machine and architecture
Java program to find sum & average of an array
Matrix addition and subtraction in java
Symmetric matrix program in java
Arrays copyOfRange() method in java
Sorting HashMap by values in java
Convert string to date in java
Java program to convert integer value into binary
Multidimensional array in java
Matrix multiplication in java using function
Java program to swap two numbers using function
Java program to swap two numbers using bitwise operator
Java program to find circumference of a circle
Java program to calculate area of circle using method
Java program to find perimeter of a rectangle
Calculate area of rectangle using class in java
Calculate area of rectangle using default constructor in java
Calculate area of rectangle using parameterized constructor in java
Calculate area of rectangle using constructor overloading in java
Find minimum and maximum values in a java array
Static method – java convert decimal to octal
Recursion – java program to convert decimal to octal
How to remove element from arraylist in java
Java program to print odd and even numbers in an array
Even odd program in java using ternary operator
Java Bitwise AND to check a given number is odd or even
Java program to print armstrong number from 1 to 1000
Java program to check armstrong number
Java program find GCD and LCM of two numbers using euclid’s algorithm
Java program to remove vowels from a string using switch case
Java program to remove vowels from string using StringBuffer class
Java program to display prime numbers from 1 to 100
Java program to check if it is a sparse matrix
Difference between == operator and equals method in java
Java program to find largest in three numbers using ternary operator
Java program to find the largest in three numbers using nested if
Sort string array in case insensitive order and case sensitive order java
Java program to sort names in an alphabetical order
Java program to convert decimal to binary using toBinaryString and stack
Java program to convert decimal number to binary & count number of 1s
Java program to check whether string is palindrome using library methods
Java program to check palindrome string using recursion
Java program to add two numbers using method
Java program to find LCM of two numbers
Java program to find largest of three numbers
Remove duplicate elements in an array in java
Java program to find area and perimeter of square
Java program to check neon number
Area of equilateral triangle in java
Convert uppercase to lowercase in java without using string function
Area and perimeter of trapezium in java
Area of Isosceles Triangle in java
Perimeter of parallelogram in java
ArrayList trimToSize() method in java
ArrayList removeAll(Collection c) method in java
ArrayList remove(Object o) method in java
ArrayList addAll(int index, Collection<? extends E> c) method in java
ArrayList add(int index, E element) method in java
ArrayList addAll(int index, Collection<? extends E> c) method in java
ArrayList retainAll(Collection<?> c) method in java
ArrayList clone() method in java
ArrayList contains(Object o) method in java
ArrayList containsAll(Collection c) method in java
ArrayList E get(int index) method in java
ArrayList indexOf(Object o) method in java
ArrayList lastIndexOf(Object o) method in java
ArrayList isEmpty() method in java
ArrayList size() method in java
ArrayList clear() method in java
ArrayList subList(int fromIndex, int toIndex) method in java
ArrayList iterator() method in java
ArrayList listIterator(int index) method in java
ArrayList listIterator(int index) method in java
ArrayList Object[] toArray() method in java
ArrayList remove(int index) method in java
ArrayList removeIf() method in java
ArrayList ensureCapacity(int minCapacity) method in java
ArrayList forEach(Consumer<? super E> action) method in java
ArrayList removeRange(int fromIndex, int toIndex) method in java
ArrayList set(int index, E element) method in java
ArrayList spliterator() method in java
HashSet add(E e) method in java
HashSet clear() method in java
HashSet Object clone() method in java
HashSet contains(Object o) method in java
HashSet isEmpty() method in java
HashSet Iterator iterator() method in java
HashSet remove(Object o) method in java
HashSet removeAll(Collection<?> c) method in java
TreeMap K firstKey() method in java
TreeMap V get(Object key) method in java
TreeMap clone() method in java
TreeMap floorKey(K key) method in java
TreeMap ceilingKey(K key) method in java
TreeMap clear() method in java
TreeMap containsKey(Object key) method in java
TreeMap containsValue(Object value) method in java
TreeMap descendingKeySet() method in java
TreeMap descendingMap() method in java
TreeMap entrySet() method in java
TreeMap firstEntry() method in java
TreeMap floorEntry() method in java
TreeMap headMap() method in java
TreeMap headMap(K toKey boolean inclusive) method in java
TreeMap higherKey() method in java
TreeMap keySet() method in java
TreeMap lastEntry() method in java
TreeMap lastKey() method in java
TreeMap lowerEntry(K key) method in java
TreeMap lowerKey(K key) method in java
TreeMap navigableKeySet() method in java
TreeMap pollFirstEntry() method in java
TreeMap pollLastEntry() method in java
TreeMap putAll(Map<? extends K,? extends V> map) method in java
TreeMap remove(Object key) method in java
TreeMap subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) method in java
TreeMap subMap(K fromKey, K toKey) method in java
TreeMap tailMap(K fromKey) method in java
TreeMap tailMap(K fromKey, boolean inclusive) method in java
TreeSet add(E e) method in java
TreeSet addAll(Collection<? extends E> c) method in java
TreeSet ceiling(E e) method in java
TreeSet clear() method in java
TreeSet descendingIterator() method in java
TreeSet descendingSet() method in java
TreeSet clone() method in java
TreeSet contains(Object o) method in java
TreeSet floor(E e) method in java
TreeSet comparator(? super E) method in java
TreeSet higher(E e) method in java
TreeSet isEmpty() method in java
TreeSet iterator() method in java
TreeSet lower(E e) method in java
TreeSet remove(Object o) method in java
TreeSet subSet(E fromElement, E toElement) method in java
TreeSet tailSet(E fromElement) method in java
TreeSet tailSet(E fromElement, boolean inclusive) method in java
TreeSet headSet(E toElement, boolean inclusive) method in java
TreeSet headSet(E toElement) method in java
String toLowerCase(Locale locale) method in java
String indexOf(String str, int fromIndex) method in java
Array java programs examples with output for practice
How to compile and run java program
Java program to find area of circle using bufferedreader
Addition of two numbers in java using class and objects
Java program to find area of triangle
Subtract two numbers without using arithmetic operators in java
Multiply two numbers without using arithmetic operators in java
Convert decimal number to binary in java without using array
Decimal number to binary in java using recursion
Java program to convert decimal to hexadecimal using recursion
Java program convert decimal to octal using while loop
Remove element from a specific index from an array in java
Java program to insert an element at specific position in an array
Display even and odd numbers in java using for loop
Armstrong number in java using recursion
TreeSet contains(Object o) method in java
TreeSet subSet() method in java
Inverted floyd triangle of numbers in java
Reverse factorial program in java
Factorial from 1 to 10 in java
4 Digit Armstrong number in java
Java program to find trace of a matrix
Linear search in java using recursion
Year isLeap() method in java with example
Check leap year or not using conditional operator in java
Convert String to HexaDecimal in java
Convert binary to decimal in java using recursion
Print pattern in java 1 01 101 0101 10101
Floyd’s triangle number pattern using while loop in java
Floyd’s triangle star pattern in java
Java program to print prime numbers in a given range
Pascal’s triangle in java using recursion
Pascal triangle in java using array
Pascal triangle program in java without using arrays
Java program to check palindrome number using recursion
String palindrome in java without using reverse method
Java program bubble sort in ascending and descending order
Transpose of a matrix in java without using second matrix
Transpose of a matrix in java using BufferedReader
Get current date and time in java 8
String charAt() method in java
Reverse a string in java without using reverse function
Reverse a string word by word in java
Java program to calculate compound interest
Multiplication table in java using array
Java program to print prime numbers from 2 to N
Prime number program in java using scanner
Java program to print prime numbers upto n
Add two matrices in java using bufferedreader
Difference between for and for each loop in java
Java program to calculate average of 3 numbers
How to sort an array without using sort method in java
Why is string immutable in java
Sort characters alphabetically in a string in java
Reverse an array without using another array in java
Reverse an array in java using for loop
Java code to rename all files in a folder
Delete a directory recursively in java 8
Program to find area of rectangle using inheritance in java
Java program to find area of circle and rectangle using interface
Java program to calculate area of circle rectangle and triangle using switch
Swap two variables in java in single line
Swap three variables in java without temporary variable
Create Dynamic 2D array in java
How to sort TreeSet in descending order in java
TreeMap sort by values in java
TreeMap comparator() method in java with examples
Java program to remove consonants from a string
Find GCD of three numbers in java
Java program to print armstrong numbers between given range
Java program to calculate sum of even and odd numbers in an array
Java program to print odd and even numbers between 1 and 100
Count number of even and odd elements in an array in java
Java program to put even & odd elements of an array in 2 separate arrays
How to remove last element from ArrayList in java
Java program to find maximum and minimum number without using array
How to remove duplicates from array in java without using collections
Difference between while and do while loop in java
Java do while loop with user input
Java program to add two numbers using bufferedreader
String palindrome in java using stringbuffer
String palindrome in java using array
How to check if a string is in alphabetical order in java
Arrange words of a sentence in alphabetical order in java
Java program to find largest of four numbers using nested if
Java program to find smallest of three numbers using ternary operator
Write a java program to add two binary numbers
Difference between abstract class and interface in java
Difference between class and interface in java
Difference between HashMap and HashSet in java