The factorial of n numbers can be denoted as n!, it is the product of all number less than or equal to n n! = 1 * 2 * 3* . . . . (n-2) * (n-1) * n In this article, we will create the Factorial Program in Java using the below 4 ways Using For loop Using While loop Using Do While loop Using Recursion … [Read more...]

## 7 Java Reverse String Programs – Including Word by Word

How to Reverse a String in Java is one of the popular interview questions, but the interviewer might add some twist to it by asking you to write the code without using the reverse() method, recursion, etc. In this article, we will learn the possible ways of reversing a string in Java. We will look into techniques of reversing a single word and group of words in a sentence [Word … [Read more...]

## Tower of Hanoi in Java Using Recursion

What is Tower of Hanoi ? Tower of Hanoi is also called as Tower of Brahma or Lucas Tower. It is one of the most popular problem which makes you understand the power of recursion. Tower of Hanoi is a mathematical puzzle which consist of 3 poles and number of discs of different sizes. Initially all the discs will be places in the single pole with the largest disc at the bottom … [Read more...]