java

java

Two different ways in Java to find all duplicate string characters

Learn how to find the duplicate characters in a string in Java in two different ways. We will learn how to do that by using two loops and with a single iteration with examples.

Read
java

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

Java program to check if a number is Kaprekar number or not. We will also write a program to find all Kaprekar numbers in between 1 to 10000.

Read
java

Java Math signum function explanation with examples

Java Math signum function explanation with example. The signum function is used to get the signum function of the argument. It is a static function and this program will show you how to use it with example.

Read
java

Java Math copySign method explanation with examples

Java Math copySign method explanation with example. copySign method is used to copy the sign of one parameter to another parameter in Java. This post will show you how to use copySign method with examples.

Read
java

Java String toLowerCase and toUpperCase methods

Java String toLowerCase and toUpperCase methods explanation with examples. toLowerCase method is used to convert all characters of a string to lowercase and toUpperCase method is used to convert all characters to uppercase in Java.

Read
java

Java program to check if a number is Armstrong or not

Java program to check if a number is Armstrong or not in 2 different ways. The program will take a number as input from the user and print if the number is Armstrong or not.

Read
java

Java ArrayList addAll method explanation with examples

Java ArrayList addAll method explanation with different examples. Learn the definition of addAll with different examples. addAll can be used to add multiple elements to an ArrayList in Java.

Read
java

How to use try without catch in Java

How to use try without catch in Java. We can use try without a catch or finally block in Java. Let's learn it with an example.

Read
java

Java program to swap two numbers without using a third number

Java program to swap two numbers without using a third number. We can swap two numbers if we have a third number, but how can we swap two numbers without using a third number?

Read
java

Java program to remove all non-ASCII characters from a string

Java program to remove all characters that are non-ASCII. We will learn three different ways in Java to remove all characters from a string which are not ASCII.

Read