Different ways in Java to print a Fibonacci triangle. Learn how to print a Fibonacci triangle by using a for loop, while loop and with a separate method.
ReadJava program to convert a hexadecimal value to decimal in two different ways. We will learn how to do the conversion by iterating through the digits of the number and by using Integer.parseInt method.
ReadJava program to print the harmonic series. We will learn three different ways to print this series. The program will print the value as number or as string.
ReadJava program to check if two strings are anagram or not. The program will take two strings as the inputs and return one boolean value if the strings are anagram or not.
ReadJava program to find the first repeating character of a string. We will learn two ways to do it, by using a for loop and by using a hashset.
ReadJava program to find a random value in an array in 4 different ways. We will use java.Math, java.util.Random, java.util.concurrent.ThreadLocalRandom and SecureRandom to find a random value in an array.
ReadHow to check if a year is leap year or not in Java. We will also learn how to print all leap years in a given range of years.
ReadDifferent Java programs to find the factorial of a number. Learn how to do it by using a for loop, while loop, do-while loop and recursively.
ReadJava program to check if a string is a prime number or not. This program will take a string value as an input from the user and print if it is prime. We will learn 3 different ways to do that.
ReadJava program to find all prime numbers from 1 to N. This post will show you how to find if a number is prime or not and how to find all prime numbers in a range in Java.
Read