Java Two-Dimensional Array

     The arrays we used so far were uniform series arrays, where all the array elements stay in a simple list, like in a column. This is the structure of one-dimensional array, where all elements fit in one list (life is very simple). But sometimes, you may need to divide the list in a delimited sections.

Java Array

     We know that variables are used to store data in a Java program. We also know that each variable can store not more than one data item. So, what do we do if we need to store a large number of data items, say 50. Well, we can use 50 variables, one for each of the 50 data items, but we need to write 50 lines of code for setting up these variables, or we can use ARRAYs. Which will need just a single line. Most real-world programs handle vast amount of data. An array with loops can relatively handle a vast amount of data.

Nth Fibonacci number using Java Recursion

     There are certain problems that just make sense to solve using Java Recursion. Demonstrating Fibonacci Series is one of them. Let’s take a look at something called Fibonacci series. Here are the first few numbers of this series:
0, 1, 1, 2, 3, 5, 8, 13, 21…
     Now stop reading and try to figure out what’s going on or let’s walk thru the sequence together and see how it works:

Russian Peasant Multiplication

     This method involves a process of halving and doubling, which reduces one factor to powers of two and uses the distributive property of multiplication over addition to calculate a product.

Multiplication:     
                              25                    37
                              12                    74
                              6                      148
                              3                      296
                              1                      592
                            -------------------------           Therefore, 37 + 269 + 592 = 925
                                                      925                              ( 25 x 37 = 925 )

Just some of my favorite Philosoraptors

Originally shared by Not Adela
Philosoraptors
Philosoraptors

Java Recursion Method

     This is one of my favorite part of java programming. It is little bit complex with its function. And obviously, it will turn to be a fun part, if you get it. It is called Java Recursion.
So what is Java Recursion?
Recursion is a programming technique where a method calls itself to find result.