Java

23
2277 reads

February 12, 2013

Reversing and Counting Number of digits in a number


While-loop is a entry controlled loop.
It checks for test condition before entering the loop.
In this program, we check that if 'num' is not equal to 0.

113
2286 reads

February 12, 2013

First Five Natural Numbers


In this example simple example of for loop is given
By running loop variable 'i' from 1 to 5, we can its value also.

34
2446 reads

February 12, 2013

Bubble Sort


Bubble Sort is one of simplest sorting techniques in an array.
In this technique we compare element in hand with next element of array.

26
2361 reads

February 12, 2013

Pascals Triangle


Pascal traingle is a pattern
1
11
121
1331
Displaying a pattern like this requires use of array.

29
269 reads

February 12, 2013

Insertion sort


Insertion sort demonstrated

30
320 reads

February 12, 2013

Selectionsort


Selection sort demonstrated.

31
2248 reads

February 11, 2013

Days in a Month- In an array


An Array is a group of like-typed variables that are referred to bya common name.
Arrays offer a convenient means of grouping related information.

54
301 reads

February 11, 2013

Bubblesort


Demonstration of bubblesort

231
4341 reads

February 11, 2013

Multi-Dimensional Array Initialization


Multi-dimensional array is "Array Of Arrays".
This example shows the declaration of a 3-dimensional array and adding two 3*3 matrices.

203
3335 reads

February 11, 2013

Array Initialization and Sorting the array.


This example shows that how to initialize an one dimensional integer array and how to sort it in ascending order.