Java Program to Print 1 to 100 Numbers without using Loop

Write a java program to print 1 to 100 numbers without using loop.  This problem is very interesting and tricky for beginners. You have to think how you can print numbers from 1 to 100 without using for and while loop in your code.

We can easily solved this problem using loop (for and while loop).  But suppose you don’t have to use loop to print the numbers.

Java Program to Print Numbers from 1 to 100 without using Loop

Java Program to Print Numbers from 1 to 100 without using Loop

We can easily print the numbers from 1 to 100 using recursion. In that case, we don’t have to use any for and while loop.

If you are not familiar with recursion then check my previous tutorial on recursion.

Programming video tutorials

Java Program to Print 1 to 100 Numbers without using Loop

Let’s write a java code to print 1 to 100 without using loop. In this code example, we are going to use recursion to solve this problem.

C programming questions for practice

Java programs

Tagged , . Bookmark the permalink.

About WebRewrite

I am technology lover who loves to keep updated with latest technology. My interest field is Web Development.