java

Java program to check if a number is perfect square or not

Check if a number is a perfect square or not in Java. We will learn two ways, by using Math.sqrt and by using Math.floor with Math.ceil with examples for each.

Read
java

Java program to filter a map by key and value

Java program to filter a map by key and value. We will learn four different ways to filter a map in this post, by using a loop and with Stream API.

Read
java

Java program to print from A to Z

Java program to print from A to Z. This post will show you how to write programs to print A to Z in Java in three different ways.

Read
java

Java program to check if a character is Alphabet or not

Java program to check if a user input character is an Alphabet or not. We will learn 4 different ways to check for alphabet in Java.

Read
java

Java program to print X star pattern

Java program to print a x star pattern. We will learn 3 different ways to print the plus pattern with star or any other character in Java.

Read
java

Java program to print a plus star pattern

Java program to print a plus star pattern. We will learn 3 different ways to print the plus pattern with star or any other character in Java.

Read
java

Java program to print hollow diamond star pattern

Java program to print a hollow diamond star pattern. This post will show you how to print a hollow diamond start pattern by using a separate method with an example Java program.

Read
java

How to print a Hollow Rhombus pattern in Java

Java program to print a Hollow Rhombus pattern in Java. We will learn how to print this pattern with for loops and while loops in this post.

Read
java

3 ways to find perfect numbers in a range in Java

Java program to find all perfect numbers in a range in 3 different ways. Learn what is a perfect number and how to find all perfect numbers in a range.

Read
java

How to find the product of digits of a number in Java

Java program to find the product of digits of a number. This post will show you the algorithm and two different ways to find the product of digits of a given number.

Read