java

java

Java Math.random() method example to create random numbers

Java Math.random() method explanation with examples. Learn to generate random numbers and random numbers in range by using the random() method.

Read
java

Java program to check if a number is evil number or not

Java program to check if a user input number is evil number or not. Learn how to check if a number is evil number using 3 different ways. Also learn how to find all evil numbers from 1 to 100 in Java.

Read
java

Java program to check if a number is a duck number or not

Java program to check if a number is a duck number or not. This program will take one number as input from the user and print if the number is a duck number or not.

Read
java

Java program to check if a number is a spy number or not

Java program to check if a number is spy number or not. We will learn two different ways to get a number as input from the user and check if it is a spy number.

Read
java

3 different Java programs to print Pascal's triangle for a given height

Learn to print Pascal's triangle in three different ways in Java. The programs will take the height of the triangle as input and print the Pascal's triangle.

Read
java

Java program to print a cross star pattern

Java program to print a cross star pattern using star or any other character. The program will take the height as input and it will print the cross star pattern.

Read
java

Java.util.Arrays.copyOf() method explanation with example

Java util.Arrays.copyOf() method is used to copy an array. This post will show you how to use copyOf() with examples.

Read
java

Java program to check if a number is Nelson number or not

Java program to check if a number is Nelson number or not. This program will take one number as input and find out if that number is a Nelson number.

Read
java

Java program to check if a number is a unique number or not

Java program to check for a unique number. The program will take one number from the user and print if it is a unique number or not. A positive number is called a unique number if no digit is repeated in that number.

Read
java

Java program to check if a number is a ugly number or not

Java program to check for an ugly number. This program will take one number as input from the user and print if it is ugly or not. Ugly numbers are numbers whose prime factors are 2,3, and 5.

Read