java

java

Java next() vs nextLine() differences with examples

Learn the differences between Scanner next() and nextLine() in Java with examples. Both of these methods are used to read user input as strings.

Read
java

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

Learn how to check if a number is a composite number or not in Java. Also, learn how to find all composite numbers in a given range in Java.

Read
java

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

Java program to check if a number is a special number or not. This post will show you how to check for a special number with or without using a separate function and with a user-input number.

Read
java

Java program to add, subtract, multiply and divide using switch case

Java program to add, subtract, multiply and divide using switch case in two different ways. The program will take the numbers as input from the user.

Read
java

Java program to find quotient and remainder in two different ways

Java program to find quotient and remainder of two user given numbers in two different ways. We will learn how to use a separate function to find quotient and remainder.

Read
java

5 different Java program to print a hollow square star pattern with diagonal

Java program to print a hollow square pattern with star in 5 different ways. Learn how to do this by using for loops, while loops, do-while loops, using a separate method and with user-input character.

Read
java

3 different Java program to find the volume of a cylinder

Java program to find the volume of a cylinder in 3 different ways. We will learn how to find the cylinder volume by taking the values as inputs and by using a separate method.

Read
java

Java program to check if a number is circular prime or not

Java program to check if a number is circular prime or not. The program will take one number as input from the user and print a message that it is circular prime or not.

Read
java

4 ways in Java to print an inverted right-angled triangle

Different ways in Java to print an inverted right-angled triangle. We will use for loops, while loops, using any character and with a separate method.

Read
java

4 ways in Java to print a right-angled triangle

Different ways in Java to print a right-angled triangle. Learn how to print it by using for loops, while loops, with any character and by using a separate method.

Read