Java tutorials and Example programs
- Java math module
- Java lambda Expression
- Final keyword in Java
- Java listiterator Example : Iterate through a list using listiterator
- Java StringJoiner example
- Java 8 LocalDate Example program to find difference between two dates
- What is an Exception in Java and types of exceptions
- Java System.nanoTime and System.currentTimeMillis
- SortedSet in Java explanation with Example
- Create Random int,float, boolean using ThreadLocalRandom in Java
- Bubble sort in Java with Examples
- Java BufferedReader and FileReader example read text file
- Java Linear Search : search one element in an array
- Java StringTokenizer example to Split a String
- Java 8 Stream min and max method examples
- Java ListIterator set method example
- Implement a Queue Data Structure in Java using LinkedList
- How to override toString method to print contents of a object in Java
- Java 8 example to convert a string to integer stream (IntStream)
- Java LinkedHashMap : create,iterate through a LinkedHashMap
- Static import in Java explanation with example
- Java DayOfWeek explanation with example
- How to sort a list in Java : Explanation with example
- Java program to find the counts of each character in a String
- Java program to check if a Matrix is Sparse Matrix or Dense Matrix
- Java program to convert decimal to binary
- Java program to print multiplication table
- Java program to print a Rhombus pattern
- Java program to print triangle and reverse triangle
- Java program to find union and intersection of two arrays
- Java program to find closest number to a given number without a digit :
- Java program to find all strong numbers in a range
- Java program to find the number of vowels and digits in a String
- Java program to find pairs with a given sum in an array
- Java program to find the most frequent element in an array
- Java program to find current resolution of the Screen
- Java program to find ASCII value of a Character
- Java Program to convert decimal to Hexadecimal
- Java program to find Saddle point of a Matrix
- Java program to find Harshad or Niven number from 1 to 100
- Java program to write an infinite loop using for and while
- Java program to Print Floyd Triangle
- Java Program to count the divisors of a number
- Java program to copy file
- Java program to calculate Discount Price
- Java Program to find all Evil Number from 0 to 100
- Java program to read contents of a file using FileInputStream
- Java program to read contents of a file using FileReader
- Java program to find square root and cubic root of a number
- Java program to print all files and folders in a directory in sorted order
- Java program to convert octal to binary
- Java program to rotate each words in a string
- Java program to convert string to byte array and byte array to string
- Java program to convert a string to lowercase and uppercase
- Java Program to calculate BMI or Body Mass Index
- Java program to find the area and perimeter of an equilateral triangle
- Java Program to print the sum of square series 1^2 +2^2 + ….+n^2
- Java Program to Delete a file using ‘File’ class
- Java program to find out the top 3 numbers in an array
- Java program to print the ASCII value of an integer
- Java Program to get the last modified date and time of a file
- Java Program to Multiply Two Matrices
- Java program to find Permutation and Combination ( nPr and nCr )
- Java Program to reverse a number
- Java program to print a rectangle using any special character
- Java program to print a square using any character
- Java program to find the kth smallest number in an unsorted array
- Java Program to find the last non repeating character of a string
- Java Program to get all the permutation of a string
- Java program to get inputs from user using Scanner Class
- Java Program to find Simple Interest
- Java program to remove element from an ArrayList of a specific index
- Java Program to find Transpose of a matrix
- Java Program to check if a number is Neon or not
- Java program to find maximum and minimum values of a list in a range
- Java program to check if a number is perfect or not
- Java program to find the circumference and area of a circle
- Java program to get the maximum number holder Student
- Java program to calculate the area and perimeter of a rectangle
- Java program to find the sum of all digits of a number
- Java program to remove all white space from a string
- Java program to capitalize first letter of each word in a string
- Java program to convert a string to boolean
- Java program to replace string in a file
- Java program to count the occurrence of each character in a string
- Java program to find count of words and find repeating words in a String
- Java program to find the duplicate elements in an array of Strings
- Java program to find the sublist in a list within range
- Java program to swap first and last character of a string
- Java program to find the total count of words in a string
- Java program to print random uppercase letter in a string
- Java program to read and print a two dimensional array
- Java program to print an identity matrix
- Java program to print the boundary elements of a matrix
- Java program to extract all numbers from a string
- Java Program to create a temporary file in different locations
- Java program to check if a number is Pronic or Heteromecic
- Java program to check if all digits of a number are in increasing order
- Java program to move all zeros of an integer array to the start
- Java program to move all zero of an integer array to the end of the array
- Java program to check if a matrix is upper triangular matrix or not
- Java program to find three numbers in an array with total sum zero
- Java program to compare two strings using contentEquals method
- Java program to extract a substring from a string
- Java program to find if a substring exist in a user input string or not
- Java program to find the maximum value between two BigInteger
- Java program to merge values of two integer arrays
- Java example to find missing number in an array of sequence
- Java program to remove vowel from a string
- What is Jagged Arrays in Java : explanation with examples
- Different usage of super keyword in Java
- Java Program to convert an ArrayList to an Array
- Java program to Convert a double to string without exponential
- Java example to filter files in a directory using FilenameFilter
- Java program to do left rotation ‘n’ times to an array
- Java RandomAccessFile explanation with examples
- Java deep copy example using SerializationUtils
- 4 different ways to Sort String characters Alphabetically in Java
- Java strictfp keyword : Explanation with example
- Java program to convert a string to an array of string
- How to add zeros to the start of a number in Java
- Java Example to empty an Arraylist
- Java user defined or custom exception example
- 4 different ways to convert a string to double in Java
- How to convert stacktrace to string in Java
- How to convert a boolean to string in Java
- Java program to print below and above average marks students
- How to remove elements of Java ArrayList using removeIf() method
- Java program to sort an array of integers in ascending order
- Read json content from a file using GSON in Java
- How to write json data to a file in Java
- How to clone or copy a Vector in Java
- How to read elements of a Java Vector using iterable
- How to add elements to a Java vector using index
- How to compare Substrings in Java using regionMatches
- Java peek(), peekFirst() and peekLast() explanation with examples
- Java LinkedList poll, pollFirst and pollLast example
- Java program to print all contents of a vector using enumeration
- Java string compareToIgnoreCase and compareTo methods
- Java example program to create one ArrayList of ArrayList
- Java compareToIgnoreCase method explanation with an example
- Java program to clear a vector or delete all elements of a vector
- Difference between Java compareToIgnoreCase and equalsIgnoreCase
- Java string intern method explanation with an example
- Java program to check if a number is a buzz number or not
- Java String concat example
- Java arraylist set method example
- Java example program to left shift an array
- Introduction to Java JShell or Java Shell tool
- Write a love calculator program in Java
- Java program to subtract one matrix from another
- How to use addExact and subtractExact in Java 8
- Java Math incrementExact explanation with example
- Java Math decrementExact explanation with example
- Convert Java file to Kotlin in Intellij Idea
- Java program to calculate electricity bill
- What is a copy constructor in Java - Explanation with example
- Java program to find the third largest number in an unsorted array
- Two different ways to start a thread in Java
- Java stream findFirst() explanation with example
- Java Stream findAny method explanation with example
- 2 different ways to swap two elements in an ArrayList in Java
- How Java Collections.rotate method works
- What is static method shadowing in Java
- 3 different ways to copy a string in Java
- Difference between findAny and findFirst of Java Stream API
- Java stream mapToInt explanation with examples
- Java program to check if the first character of a string is number/digit
- How to get a random line from a file in Java
- How to get the last element of a stream in Java
- Java program to check if a user input number is strong or not
- Java program to find the factors of a number
- Java Program to find the first digit of a positive or negative number
- Java program to get the sum of even numbers in an array
- Java program to find the sum of all odd numbers in an array
- Java program to find the area of a Trapezoid
- Java program to find all files with given extension in a directory and its subdirectories
- Java program to read user input using Console
- How to create a directory programmatically in Java using File class
- Find the largest number from an array in Java
- Java program to find the absolute value of a number
- Java program to get the epoch timestamp
- How to convert a negative number to positive in Java
- Java program to find the maximum element in a HashSet
- How to add items to a HashSet in Java
- How to remove specific items or remove all items from a HashSet
- 3 different ways to iterate over a HashSet in Java
- 3 different ways in Java to convert comma-separated strings to an ArrayList
- Java program to convert a character to string
- Java program to convert byte to string
- Java program to convert a string to ArrayList
- How to remove empty values while split in Java
- Java program to find the sum of the series 1 + 1/2 + 1/3 + 1/4 or harmonic series
- Java program to print the Arithmetic Progression series
- How to reverse a string in Java
- Java example program to find the area of a Parallelogram
- Write a number guessing game in Java
- How to overload main method in Java
- Java program to find the perimeter of a circle
- Java program to find the cube of a number
- How to reset a Scanner in Java
- Java program to sort array elements by frequency
- Java program to reverse an array without using an additional array
- Java HashMap.merge() method explanation with examples
- Java program to convert a boolean array to string array
- 5 Different ways to append text to a file in Java
- Can Enum implements interfaces in Java
- Java program to find special numbers in a range
- Create a Rectangle class in Java and calculate area, perimeter
- Java program to check if a number is special or not
- Java program to find the sum of 0, 1, 1, 2, 3, 5, 8.. or Fibonacci series
- How to find the velocity in Java using user-give values
- Java program to convert a decimal to binary format for a float or double value
- How to add a character to the start and end of a string in Java
- Java program to add characters to the middle of a string
- How to remove the first element of an ArrayList in Java
- Java program to check if a number is Automorphic or not
- Java program to check if two numbers are Amicable or not
- Java program to check if a number is a happy number or not
- Java program to print the Neon numbers from 0 to 10000
- How to remove the first character of a string in Java
- How to remove the last character of a string in Java
- Java program to convert string characters lowercase to uppercase without using any library function
- How to convert miles to kilometers and kilometers to miles in Java
- Java program to check if a number is valid IMEI or not
- How to take a string with blank spaces as input in Java
- Java program to find the average of two numbers
- Java array copyOfRange method explanation with example
- Java program to check if a number is a tech number or not
- How to import math class in Java example
- How to use pi value in Java with example
- Java program to check if a number is a ugly number or not
- Java program to check if a number is a unique number or not
- Java program to check if a number is Nelson number or not
- Java.util.Arrays.copyOf() method explanation with example
- Java program to print a cross star pattern
- 3 different Java programs to print Pascal’s triangle for a given height
- Java program to check if a number is a spy number or not
- Java program to check if a number is a duck number or not
- Java program to check if a number is evil number or not
- Java Math.random() method example to create random numbers
- Java program to check if a number is a spy number or not
- 4 different Java program to check if a number is a sunny number or not
- Java Arrays binarySearch method explanation with example
- java.util.Arrays.deepEquals method explanation with examples
- java.util.Arrays.fill method explanation with examples
- Java Arrays toString method explanation with example
- Java Program to check if a number is magic number or not
- Java Arrays hashCode() method explanation with examples
- Java Arrays sort method explanation with example
- 7 different Java programs to check if a number is Even or odd
- Java program to find the roots of a quadratic equation
- How to pass an array to function in Java
- 4 different Java programs to find the distances between two points
- Java program to find the sum of digits of a number until a single digit is found
- Java program to remove all non-ASCII characters from a string
- Java program to swap two numbers without using a third number
- How to use try without catch in Java
- Java ArrayList addAll method explanation with examples
- Java program to check if a number is Armstrong or not
- Java String toLowerCase and toUpperCase methods
- Java Math copySign method explanation with examples
- Java Math signum function explanation with examples
- Java program to check if a number is Kaprekar number or not
- Two different ways in Java to find all duplicate string characters
- Java String.replace() method explanation with example
- Java StringBuffer.reverse() method explanation with examples
- Java program to check if a string is empty or not
- How to reverse each word of a string in Java
- Java program to check if a string is palindrome or not
- Java program to check if a given number is a prime number or not
- Java program to find all prime numbers from 1 to N
- Java program to check if a string is a prime number or not
- Different ways to find the factorial of a number in Java
- Java program to check if a year is a leap year or not
- 4 different Java program to find a random value in an array
- Java program to find the first repeating character in a string
- Java program to check if two strings are an anagram or not
- Java program to print the harmonic series
- Java program to convert a Hexadecimal value to Decimal
- 3 ways in Java to print a Fibonacci triangle
- 4 ways in Java to print a right-angled triangle
- 4 ways in Java to print an inverted right-angled triangle
- Java program to check if a number is circular prime or not
- 3 different Java program to find the volume of a cylinder
- 5 different Java program to print a hollow square star pattern with diagonal
- Java program to find quotient and remainder in two different ways
- Java program to add, subtract, multiply and divide using switch case
- Java program to check if a number is a special number or not
- Java program to check if a number is a composite number or not
- Java next() vs nextLine() differences with examples
- Java program to check for disjoint sets in two ways
- 4 different Java programs to convert a list to set
- Java program to convert an image to Base64 in 2 different ways
- Java program to print odd numbers from 1 to 100
- Java program to print an upper triangular matrix
- How to remove all white spaces from a file in Java
- 5 ways in Java to print the total number of days in a month
- Java program to find the power of a number using recursion
- Java program to calculate compound interest
- 3 ways in Java to print Hello World without semicolon
- 3 ways in Java to print a reverse half pyramid pattern
- Java program to find the largest and smallest of three numbers
- Java vector addAll method explanation with example
- Java program to find the largest and smallest of n user input numbers
- Java program to print left-aligned and right-aligned staircase patterns
- 4 ways in Java to convert a decimal value to octal
- Java program to round a number to n decimal places
- Java program to print the vowels in a string
- Java program to print inverted Pyramid patterns in different ways
- Java program to print a diamond pattern with stars
- 2 different Java programs to check for Moran number
- Java program to calculate student grades in 2 different ways
- 3 different Java programs to find the next prime number
- Can we have multiple public Java classes in one file
- How to handle multiple exceptions in Java
- Can we execute a Java program without the main method
- Different ways to add elements to an ArrayList in Java
- Java String charAt method explanation with examples
- 3 ways to convert System.nanoTime to seconds in Java
- 4 different Java program to find the HCF or GCD of two numbers
- Java ArrayList ensureCapacity method
- Java ArrayList clone method explanation with example
- How to find the product of digits of a number in Java
- 3 ways to find perfect numbers in a range in Java
- How to print a Hollow Rhombus pattern in Java
- Java program to print hollow diamond star pattern
- Java program to print a plus star pattern
- Java program to print X star pattern
- Java program to check if a character is Alphabet or not
- Java program to print from A to Z
- Java program to filter a map by key and value
- Java program to check if a number is perfect square or not
- 7 ways to sort an ArrayList of objects in Java
- Java checked and unchecked exceptions example
- What is hybrid inheritance in java
- How to format a Date in AM/PM in Java
- Java method overriding explanation with example
- Java method overloading explanation with example
- Java ArithmeticException explanation with examples
- Java program to read user input numbers with blank spaces