Listen to this article

Having written a lot of posts on Java for this entire month, what better way to round it off than do a few programs that will bring some set of concepts into play? 🙂

Here are a few basic Java programs which are very popular:

  1. Reversing the digits of an integer
  2. Printing the Fibonacci series
  3. Printing a pattern

  1. We can see the concepts of Strings, loops, wrapper classes, modifiers when we try to reverse the digits of this integer:
 

2. This is the second program which deals with the Fibonacci series. A Fibonacci series is one which goes like this:

0,1,1,2,3,5,8….

The first two numbers are added and the result is printed out. The numbers are swapped and the series continues.

 

3. The third program makes use of two ‘for’ loops and prints a pattern

 

These are some extra simple Java programs illustrating the various concepts…

Join me tomorrow for a personal post! 🙂

I’m participating in #BlogchatterA2Z by Blogchatter 

(Visited 36 times, 1 visits today)

Related Posts

One thought on “Xtra programs in Java

Leave a Reply