Java program to check if a user input number is strong or not. A number is called a strong number if the sum of all factorials of its digits is equal to the number itself.
ReadLearn how to get the last element of a Java stream. We will learn two different ways to find the last element of a stream with examples.
ReadJava program to get a random line from a file in Java. This program will take the path of the file and print a random line. You will learn how to use Random module to create a random number.
ReadJava program to check if the first character of a string is a number or digit. We will learn to solve this by using two different ways - using charAt and isDigit and by using regex.
ReadJava stream mapToInt is used to get one integer stream from a different stream by applying a functing to all members of a stream. This post will show you how to use mapToInt with example.
ReadfindAny and findFirst methods are defined in Java Stream API. This post will show you the difference between these methods with example.
ReadLearn how to copy a string in Java in three different ways. We will learn how to copy a string using direct assignment, using StringBuffer and using String.copyValueOf.
ReadMethod shadowing comes up when we have methods with same name and parameters in both super class and sub class. This post will show you what is static method shadowing works in java.
ReadLearn how java.util.Collections work with example. rotate method is used to rotate the contents of a list. It takes the list and distance as parameters.
ReadThis post will show you two different ways to swap two elements in an ArrayList in Java. The program will take the index positions from the user and swap the values in the ArrayList.
Read